[Haskell-cafe] Can I use Haskell for web programming
bringert at cs.chalmers.se
Sun Jan 22 07:30:19 EST 2006
Neil Mitchell wrote:
>> Can I use Haskell to do what people do with, say, PHP?
> I wrote Hoogle (http://haskell.org/hoogle) using Haskell, without
> using any libraries - just directly as a console program. It's open
> source so you can download it and see how its done, if you want. Of
> course the web handling bit is more low level than WASH and HSP.
Warning: Shameless plugs follow
If you want to be somewhere in between the high-level WASH/HSP and the
low-level implement-it-all-yourself approach, you may want to have a
look at the following libraries.
The cgi package allows you to write CGI programs without caring about
low-level communication with the webserver and stuff like how form data
is encoded: http://www.cs.chalmers.se/~bringert/darcs/haskell-cgi/
There is also a FastCGI wrapper you can use to get better performance
from your CGI programs (written using the above library):
With the xhtml package you can create XHTML documents using simple
Haskell functions: http://www.cs.chalmers.se/~bringert/darcs/haskell-xhtml/
It is a very simple adaptation of Andy Gill's Text.Html module.
The URLs above all point to darcs repos for the libraries.
> On 21/01/06, Maurício <briqueabraque at yahoo.com> wrote:
> and more
>>I have the need for that, and I've been looking into Ruby on Rails. Do
>>you thing Haskell could be a choice? Of course, I don't need something
>>exactly like PHP (for instance, I don't care if I can't insert code in
>>the middle of xhtml pages. If I have to generate everything from Haskell
>>code, I would probably like it. Also, CGI can be a choice). But I need
>>reasonable efficiency and to be able to find someone to host my site.
>> What solutions do you suggest me?
More information about the Haskell-Cafe