I would like to use Haskell more for my projects, and I think if I can get started using it for web apps, it would really help that cause. I have tried happs once or twice but had trouble getting off the ground. Are there simpler/more conventional (more like lamp) frameworks out there that I can use or should I just give happs another try?
8 Answers
The best tools as of 2011 are:
The web development community around Haskell has been thriving on the competition between these communities.
The authors even compare their frameworks here: Comparing Haskell's Snap and Yesod web frameworks

- 1
- 1

- 137,316
- 36
- 365
- 468
I developed MFlow with the idea of the highest functionality/code size ratio. MFlow is made with no other framework in mind, but to use Haskell to the limit to solve the problems of web applications to reduce drastically the noise and the error ratio in web programming. The entire navigation in a MFlow application is safe at compile time. It uses standard web libraries: WAI, formlets, stm, blaze-html..
Judge for yourself: This is a complete application with three pages. In a loop, it ask for two numbers and show the sum. you can press the back button as you please:
module Main where
import MFlow.Wai.Blaze.Html.All
main= do
addMessageFlows [("sum", transient . runFlow $ sumIt )]
wait $ run 8081 waiMessageFlow
sumIt= do
setHeader $ html . body
n1 <- ask $ p << "give me the first number" ++> getInt Nothing
n2 <- ask $ p << "give me the second number" ++> getInt Nothing
ask $ p << ("the result is " ++ show (n1 + n2)) ++> wlink () << p << "click here"
The state can be made persistent with a little modification.
http://hackage.haskell.org/package/MFlow
There are examples here : http://haskell-web.blogspot.com.es/

- 166
- 1
- 5
If you decide to go with HApps you'll probably want to checkout this excellent example driven tutorial that is being developed as a HApps application: HApps Tutorial

- 13,684
- 8
- 33
- 56
Here is a list of web related blog posts about Haskell from the wiki.
Furthermore, the next big Haskell web framework is WASH.
And there is an Apple webobjects based domain specific language.

- 4,903
- 5
- 32
- 43

- 3,894
- 2
- 27
- 39
The Web Application Interface, WAI, is a very nice base layer that you can build apps on top of. There are many nice libraries on hackage for routing, templating, etc that work well in combination with WAI, which is what I do.

- 4,903
- 5
- 32
- 43

- 10,999
- 5
- 47
- 71
Yesod would be a good choice, you can find O'Reilly's Yesod Web Framework Book online.

- 4,903
- 5
- 32
- 43

- 1,854
- 4
- 25
- 57
You can use CGI and an (x)html combinator library, as listed in the wiki's Haskell Web Development article. A larger overview of libraries, frameworks etc. for web programming in haskell can be found in Practical web programming in Haskell.

- 4,903
- 5
- 32
- 43

- 2,420
- 21
- 25
-
CGI is very simple, especially on systems running Apache. You just make an executable that prints out an HTML page (or part of it). You can parse the url (GET) string and getting POST data from the system using environment variables. It's simple but building a sytem from those pieces takes work. – Jared Updike Dec 01 '08 at 18:56
There is also Hope (link is depreciated), although it doesn't seem to have gained as much traction as HApps and WASH. However, the site has also been quiet for about a year.

- 4,903
- 5
- 32
- 43

- 7,079
- 5
- 23
- 16