Haskell and html input elements

Hi back again! How easy/hard is it to control a haskell program through a web browser? Cheers Paul

On Nov 12, 2007, at 8:38 AM, PR Stanley wrote:
Hi back again! How easy/hard is it to control a haskell program through a web browser?
Hi, It depends on exactly how you want to control it, but at least some control is fairly easy. If you simply want to start a batch Haskell program, and see its output as HTML in a browser, you can use the cgi [1] or fastcgi [2] libraries listed on Hackage. If you want slightly more interactivity, it would make sense to write your Haskell program as its own web server (which is actually surprisingly easy) and have it respond to sequences of requests, perhaphs storing intermediate state along the way. Giving something like this a nice GUI on the user side will probably involve writing a certain amount of JavaScript. One example of a program that works this way is HERA [3], which is unfortunately not open-source at the moment, but may be some day. Another potentially useful library is HAppS [4], which abstracts out some of the functionality necessary for web-based applications. Is this sort of thing along the right track, or were you thinking of something else? Aaron [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ cgi-3001.1.5.1 [2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ fastcgi-3001.0.1 [3] http://haskell.org/haskellwiki/ Haskell_Equational_Reasoning_Assistant [4] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ HAppS-0.8.4

Hi
If you simply want to start a batch Haskell program, and see its output as HTML in a browser, you can use the cgi [1] or fastcgi [2] libraries listed on Hackage.
This is the approach that Hoogle takes, and turned out to be very easy. The code is all available, so you can start from that. Thanks Neil

Hi What i have in mind is an interactive Haskell app which allows the user to enter text, push buttons, select radio buttons and so on. As I have already done a lot of xhtml coding I thought it might be easier to operate the program entirely via a web browser. However, I'm also interested in the idea of a straightahead MS Windows GUI for my program but dont' really know where to start. Any advice would be most appreciated. Cheers Paul At 17:13 12/11/2007, you wrote:
On Nov 12, 2007, at 8:38 AM, PR Stanley wrote:
Hi back again! How easy/hard is it to control a haskell program through a web browser?
Hi,
It depends on exactly how you want to control it, but at least some control is fairly easy.
If you simply want to start a batch Haskell program, and see its output as HTML in a browser, you can use the cgi [1] or fastcgi [2] libraries listed on Hackage.
If you want slightly more interactivity, it would make sense to write your Haskell program as its own web server (which is actually surprisingly easy) and have it respond to sequences of requests, perhaphs storing intermediate state along the way. Giving something like this a nice GUI on the user side will probably involve writing a certain amount of JavaScript. One example of a program that works this way is HERA [3], which is unfortunately not open-source at the moment, but may be some day. Another potentially useful library is HAppS [4], which abstracts out some of the functionality necessary for web-based applications.
Is this sort of thing along the right track, or were you thinking of something else?
Aaron
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ cgi-3001.1.5.1 [2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ fastcgi-3001.0.1 [3] http://haskell.org/haskellwiki/ Haskell_Equational_Reasoning_Assistant [4] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ HAppS-0.8.4
participants (3)
-
Aaron Tomb
-
Neil Mitchell
-
PR Stanley