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?
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
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
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/
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With