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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe