[Haskell-cafe] JavaScript in a browser as a Windows GUI?

Jeremy Shaw jeremy at n-heptane.com
Thu Oct 21 14:00:20 EDT 2010

On Thu, Oct 21, 2010 at 12:04 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:

> My understanding is that Happstack is a very large, powerful and complex
> framework for writing Haskell web applications. I was under the impression
> that you use it by statically linking the HTTP server and the actual
> application together, rather than Happstack providing a standard CGI
> interface that an external application can then use.

powerful - yes! large and complex -- not so much. Though, the lower
bound on complexity is limited by the fundamental complexity of the
web itself.

But, you are correct that happstack does not currently have support
for running CGI executables. I imagine that you could write a CGI
handler (with out modifying the core code) in a few hours (maybe
less). Mostly just a matter of turning the values in the Request type
into a environment variables, and calling the executable?

That said, I am not sure why you want CGI. CGI is only simple in the
sense that it doesn't do anything for you. But that means you have to
handle all the complexity yourself. Perhaps it would be easier to just
learn happstack. It is much better documented now than it was a few
years ago (and some aspects have been simplified). And happstack-state
and happstack-server are now completely independent.

Here is a nice tutorial, http://happstack.com/docs/crashcourse/index.html
The darcs version (which will be released soon) has much better
haddock documentation as well. I would recommend the darcs version for
any new development.

- jeremy

More information about the Haskell-Cafe mailing list