
Hello, I'm interested in Haskell web programming. Quick googling took me to HAppS, HVAC, WASH and do-it-yourself blog posts. I tried HVAC, which doesn't build on GHC 6.10.1 (if somebody's interested, I'll post some compiler complaints). I really like its approach, though. Then I tried to DIY: wired Haskell to Lighty using FastCGI. This approach works, but leaves very much to desire: XHTML combinators don't really give you compile-time validation, so what is the point of writing it in code? I had thought I'd need some templating, so I tried HStringTemplate to find that it doesn't build on my GHC (BTW, this templating engine has some neat concepts, which I like :-)). Then I turned to HAppS, which is painfully slow to build on my development machine, and I think it is too monolithic. Besides, it looks like it depends on mostly experimental GHC features, and lacks documentation! I'm not a Haskell Jedi, so I think there's no way I can make it to work. I found out that WASH uses CGI, which is sooo retro. Is it just my misunderstanding, maybe? There's also a question regarding which DBC library to use. Hackage has Takusen, HaskellDB, HDBC, HSQL. So which one? I'd be very glad if somebody gave an advice to a noob Haskell web programmer. :) Regards, Artyom.

Hi, Артем — Some thoughts. (And in the interest of disclosure, I'm one of the D.I.Y. crowd.)
I tried HVAC, which doesn't build on GHC 6.10.1 (if somebody's interested, I'll post some compiler complaints). I really like its approach, though.
Try the compiler complaints on #haskell or take them straight to the HVAC maintainer/creator. FWIW, I only had to change the base version constraint in my .cabal files to get things building and working on 6.10.1.
Then I tried to DIY: wired Haskell to Lighty using FastCGI. This approach works, but leaves very much to desire: XHTML combinators don't really give you compile-time validation, so what is the point of writing it in code? I had thought I'd need some templating, so I tried HStringTemplate to find that it doesn't build on my GHC (BTW, this templating engine has some neat concepts, which I like :-)).
Are you looking for an XHTML library that's stricter in terms of compile-time validation? I agree that it can let you do silly things at present (e.g., <a><a><a>...</a></a></a>), but I've always found those things to be issues with underlying code (and thus separately testable/excludable).
I found out that WASH uses CGI, which is sooo retro. Is it just my misunderstanding, maybe?
The difference between FastCGI and CGI, from a practical point of view, is that the application process in a FastCGI application is long- lived while the application process in a CGI application lives only for the request.
There's also a question regarding which DBC library to use. Hackage has Takusen, HaskellDB, HDBC, HSQL. So which one?
I've had good luck with HDBC and SQLite3.
I'd be very glad if somebody gave an advice to a noob Haskell web programmer. :)
In realistic terms, there are only noob Haskell web programmers, but we're coming along as a community. You might find some interesting things in the FastCGI-based hpaste version: http://github.com/glguy/hpaste/tree/master BEst. -- Paul

From: web-devel-bounces@haskell.org [mailto:web-devel-bounces@haskell.org] On Behalf Of ????? ????????
I'm interested in Haskell web programming. Quick googling took me to HAppS, HVAC, WASH and do-it-yourself blog posts.
I found out that WASH uses CGI, which is sooo retro. Is it just my misunderstanding, maybe?
I think WASH was integrated with HWS, but that was a while ago and I don't know what the current state is. There is also Hyena, which is very new, but has a lot of promise: http://github.com/tibbe/hyena/tree/master http://www.galois.com/blog/2008/09/12/left-fold-enumerators-a-safe-expre ssive-and-efficient-io-interface-for-haskell/
There's also a question regarding which DBC library to use. Hackage has Takusen, HaskellDB, HDBC, HSQL. So which one?
(I'm an author and maintainer of Takusen) Takusen is fine if you use Oracle, PostgreSQL, or SQLite3. The ODBC driver still has some bugs which I need to work out. HDBC is the most popular, I think, and integrates with HaskellDB, if you are keen on that. Alistair ***************************************************************** Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. *****************************************************************

Then I turned to HAppS, which is painfully slow to build on my development machine, and I think it is too monolithic. Besides, it looks like it depends on mostly experimental GHC features, and lacks documentation! I'm not a Haskell Jedi, so I think there's no way I can make it to work.
HAppS is frustrating at first, and the lack of documentation is maddening, but it's pretty nice once you start to get the hang of it. You might look at my wiki program as an example: http://github.com/jgm/gitit/tree/master/ True, HAppS is monolithic in the sense that it provides server, state, etc. in an integrated package, but you don't have to use everything. You could just use the server, for example. (In my own app, I only use state for users and sessions. The wiki's contents are all stored in a git repository, but you could just as easily use a database.) As for the build speed: if you comment out the bits that include the Facebook module, it will build much faster. I'm hoping the HAppS developers will eventually bundle the Facebook code separately from HAppS-Server. Did you mention Kibro? That's another fastcgi based framework. John
participants (4)
-
Bayley, Alistair
-
John MacFarlane
-
Paul Brown
-
Артем Шалхаков