What is the ecosystem for Haskell web development? [closed]
Solution 1:
I have done real production web applications in Haskell. Here is the stack I used:
- PostgreSQL database backend
- HDBC Postgres to connect to it
- XHTML to generate Html. It is a bit of a funny syntax, but at least you have lambda-abstraction.
- Fastcgi to connect the backend to the lighttpd, doing the web serving.
The whole web application is a single haskell program, compiled to native code ghc. I wrote the code to do request routing (and reverse routing) by hand.
Solution 2:
First of all, a disclaimer: I've never done any Haskell web development, so I don't speak from experience.
If you look at the Web category on Hackage, there are lots of web-related packages.
I think most Haskell web application run on a custom server (possibly using Apache's mod_proxy
or IIS's Advanced Request Routing as a front end). However, there are also some FastCGI bindings.
The most prominent Haskell webserver/framework/datastorage infrastruction is Happstack, which is interesting for several reasons, the most obvious being that it stores all its state in-memory and doesn't use a relational database.
Another more recent webserver interface is hack, which I don't know much about except that the 1 minute tutorial looks interesting.
There are many more webservers/frameworks in Haskell, but these two are just the ones I know of the top of my head.