Starting Haskell with a web application

I am sure I am missing something obvious, but since the cafe is the place to ask stupid questions... I am getting more and more excited about Haskell as I learn more and more about it. Professionally, and as a hobby, I love working on web applications. Where do I get started in writing a web app with Haskell? I am looking more for a framework like Pylons and less like Apache, if that helps. I am sure someone has already done the homework on this, so a link will be fine. -- Jonathan Gardner jgardner@jonathangardner.net

Jonathan Gardner wrote:
Where do I get started in writing a web app with Haskell? I am looking more for a framework like Pylons and less like Apache, if that helps.
The closest we currently have to a web framework is Happs (http://happs.org/), but it uses the kitchen sink of advanced and unusual language extensions, which I think might be why it hasn't got all that much momentum. There's also WASH, but that has an even lower profile. I couldn't tell you if it sees much use, or even builds with recent compilers.

bos:
Jonathan Gardner wrote:
Where do I get started in writing a web app with Haskell? I am looking more for a framework like Pylons and less like Apache, if that helps.
The closest we currently have to a web framework is Happs (http://happs.org/), but it uses the kitchen sink of advanced and unusual language extensions, which I think might be why it hasn't got all that much momentum.
There's also WASH, but that has an even lower profile. I couldn't tell you if it sees much use, or even builds with recent compilers.
Perhaps it is time for a haskell web apps wiki page, if there isn't one, outlining the approaches, with a structure like: * HAppS * CGI - FastCGI * Database solutions - HDBC - Takusen * Templating - HStringTemplate * JSON rpc etc.

Don Stewart wrote:
Perhaps it is time for a haskell web apps wiki page, if there isn't one, outlining the approaches,
Indeed. In addition to the code you mention, people like Adam Langley and Johan Tibbell are taking on corners of the web app problem space in a more modern context. It's going to be an interesting year or two; I only wish we could accelerate the arrival of this particular portion of the future. We have a hole in "Real World Haskell" for writing about web development that we can't satisfactorily fill with what's currently available.

On Wed, Mar 5, 2008 at 11:07 AM, Bryan O'Sullivan
Indeed. In addition to the code you mention, people like Adam Langley and Johan Tibbell are taking on corners of the web app problem space in a more modern context.
I should probably speak up then ;) I'm (slowly) writing Network.MiniHTTP. What it does have is a modern, ByteString based HTTP parser and serialiser (in decent shape), SSL support (only in darcs at the moment) and my test case, that I'm working towards, is an OpenID consumer. Once I have that working, I'll do a second release. It's not that far off, it's just a question of time. AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org

On Wed, Mar 5, 2008 at 8:25 PM, Adam Langley
On Wed, Mar 5, 2008 at 11:07 AM, Bryan O'Sullivan
wrote: Indeed. In addition to the code you mention, people like Adam Langley and Johan Tibbell are taking on corners of the web app problem space in a more modern context.
I should probably speak up then ;)
Me too! ;) I'm writing a web application server which I'm trying to make as simple to manage as Mongrel [1], a popular Ruby web server used to host web application written in e.g. Ruby on Rails. It uses Oleg style enumerators and ByteString internally to safely an efficiently manage resources. The web application interface is that of Python's WSGI [2] but adapted to a Haskell style. I've been busy lately but starting this weekend I will have much more time to work on it and can hopefully make a first release. 1. http://mongrel.rubyforge.org/ - I believe the original author left the project so the projects original website is gone. 2. http://www.python.org/dev/peps/pep-0333/ -- Johan

From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Johan Tibell
I'm writing a web application server which I'm trying to make as simple to manage as Mongrel [1], a popular Ruby web server used to host web application written in e.g. Ruby on Rails. It uses Oleg style enumerators and ByteString internally to safely an efficiently manage resources. The web application interface is that of Python's WSGI [2] but adapted to a Haskell style. I've been busy lately but starting this weekend I will have much more time to work on it and can hopefully make a first release.
1. http://mongrel.rubyforge.org/ - I believe the original author left the project so the projects original website is gone. 2. http://www.python.org/dev/peps/pep-0333/
Do you (both) have repos that I could download from? I quite interested in both projects, esp. the WSGI clone. 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. *****************************************************************

Do you (both) have repos that I could download from? I quite interested in both projects, esp. the WSGI clone.
Yes and no. The code [1] is in my darcs repository but is in an unusable state until I've fixed my incremental parser (in Hyena/Parser.hs) which I plan to do next week. I would like the first release to be nice and polished so I'm trying to not release anything prematurely. 1. http://darcs.johantibell.com/hyena/

On Thu, Mar 6, 2008 at 3:08 AM, Bayley, Alistair
Do you (both) have repos that I could download from? I quite interested in both projects, esp. the WSGI clone.
There was a Hackage release of network-minihttp[1], which I think would serve files from the filesystem quite happily. The darcs repo is just a mess at the moment. (darcs.imperialviolet.org/network-minihttp) [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-minihttp-... AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org

On Wed, Mar 5, 2008 at 12:25 PM, Adam Langley
I'm working towards, is an OpenID consumer. Once I have that working, I'll do a second release. It's not that far off, it's just a question of time.
The darcs release of minihttp[1] can now do this. It's not a Hackage release because it needs a darcs version of HsOpenSSL[2] and network-connection[3]. The OpenID example is running in EC2[4] at the moment if anyone wants to play. [1] http://darcs.imperialviolet.org/network-minihttp [2] http://darcs.imperialviolet.org/HsOpenSSL [3] http://darcs.imperialviolet.org/network-connection [4] http://ec2-67-202-22-226.compute-1.amazonaws.com:4112/ AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org

On Wed, Mar 12, 2008 at 3:49 PM, Adam Langley
The OpenID example is running in EC2[4] at the moment if anyone wants to play.
Well, thanks to all the people who hit it, there's nothing like users to find the stupid bugs ;) * Caching was wrong on the front page, so it would act funky if you were behind a proxy * Serving from the filesystem (i.e. the CSS) was broken because I missed an action in that code All fixed... AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org

On Wed, Mar 5, 2008 at 8:00 PM, Don Stewart
bos:
Jonathan Gardner wrote:
Where do I get started in writing a web app with Haskell? I am looking more for a framework like Pylons and less like Apache, if that helps.
The closest we currently have to a web framework is Happs (http://happs.org/), but it uses the kitchen sink of advanced and unusual language extensions, which I think might be why it hasn't got all that much momentum.
There's also WASH, but that has an even lower profile. I couldn't tell you if it sees much use, or even builds with recent compilers.
Perhaps it is time for a haskell web apps wiki page, if there isn't one, outlining the approaches, with a structure like:
* HAppS * CGI - FastCGI
* Database solutions - HDBC - Takusen
* Templating - HStringTemplate
* JSON rpc
etc.
There's this: http://www.haskell.org/haskellwiki/Practical_web_programming_in_Haskell It doesn't mention many of the above, but they would be nice additions. The page should probably be split into several though. /Bjorn

On Wed, Mar 5, 2008 at 6:52 PM, Bryan O'Sullivan
Jonathan Gardner wrote:
Where do I get started in writing a web app with Haskell? I am looking more for a framework like Pylons and less like Apache, if that helps.
The closest we currently have to a web framework is Happs (http://happs.org/), but it uses the kitchen sink of advanced and unusual language extensions, which I think might be why it hasn't got all that much momentum.
There's also WASH, but that has an even lower profile. I couldn't tell you if it sees much use, or even builds with recent compilers.
My web host has GHC 6.6 and it builds fine. I like WASH quite a lot, though it may be a bit heavy-weight for certain applications in the way it does sessions (though it works really well e.g. when users click the back button etc.). Maybe zipping up the session state or something would help there (or maybe it already does this?) - on my simple toy site it takes up around 30% of the total size, which is a bit hefty. Oh yeah, I use the preprocessor thing to get the nice syntax, but it's a bit messy when things go wrong since it passes through a preprocessor before being compiled. -- Sebastian Sylvan +44(0)7857-300802 UIN: 44640862

On Wed, Mar 05, 2008 at 10:52:07AM -0800, Bryan O'Sullivan wrote:
Jonathan Gardner wrote:
There's also WASH, but that has an even lower profile. I couldn't tell you if it sees much use, or even builds with recent compilers.
The HTML component of WASH builds rather cleanly with GHC 6.8.2 after enabling the following extensions: MultiParamTypeClasses FlexibleContexts FlexibleInstances TypeSynonymInstances I use it for my statically generated blog, together with sqlite3. I've modified WASH/HTML to spit out reasonably correct XHTML as well. As for the rest of WASH, I have no idea since I had no need for it. -- Lars Viklund | zao@zao.se

Where can I find the sources of the latest WASH? I couldn't find them in
HackageDB (and neither with Google).
--
Immanuel Normann
2008/3/6 Lars Viklund
On Wed, Mar 05, 2008 at 10:52:07AM -0800, Bryan O'Sullivan wrote:
Jonathan Gardner wrote:
There's also WASH, but that has an even lower profile. I couldn't tell you if it sees much use, or even builds with recent compilers.
The HTML component of WASH builds rather cleanly with GHC 6.8.2 after enabling the following extensions: MultiParamTypeClasses FlexibleContexts FlexibleInstances TypeSynonymInstances
I use it for my statically generated blog, together with sqlite3. I've modified WASH/HTML to spit out reasonably correct XHTML as well.
As for the rest of WASH, I have no idea since I had no need for it.
-- Lars Viklund | zao@zao.se _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 2008.05.16 17:51:33 +0200, Immanuel Normann
Where can I find the sources of the latest WASH? I couldn't find them in HackageDB (and neither with Google).
-- Immanuel Normann
Did you find its homepage at http://www.informatik.uni-freiburg.de/~thiemann/haskell/WASH/? I'm afraid I dunno if there are any more recent versions. It is an old collection, as someone mentioned. -- gwern Clandestine SBS electronic NADDIS Intelligence WHCA Chavez real E.T. boobytraps
participants (11)
-
Adam Langley
-
Bayley, Alistair
-
Bjorn Bringert
-
Bryan O'Sullivan
-
Don Stewart
-
Gwern Branwen
-
Immanuel Normann
-
Johan Tibell
-
Jonathan Gardner
-
Lars Viklund
-
Sebastian Sylvan