[Haskell-cafe] Web server libraries

Niklas Broberg niklas.broberg at gmail.com
Thu Mar 27 17:23:06 EDT 2008

>  HSP: big on "dynamic pages".  I don't want to make my webserver able
>  to compile Haskell code.  Develop code, compile, test, make sure it's
>  right, then push to production every 6 months around here.

Being one of the main developers of HSP, I guess I should reply to this. :-)
HSP is indeed big on dynamic pages, if by dynamic you mean pages that
can return different results on different calls. The compile-on-demand
feature used to be a part of the old runtime for HSP, but in the
current incarnation that has been lifted out. And HSP as such is much
more a programming model - an API basically - than any particular
deployment scheme.

HSP's basic model is much more low-level than e.g. WASH, as we haven't
really had time to add any flesh to the bare bones yet. But looking at
the bright side, at least we don't have a hard to use event model...
And HSP would definitely give you control over the names of elements
if you find that you need it.

There is - currently - no built-in support for form validation in HSP,
bare bones and all that, but it's definitely a feature that we would
*like* to support. We just haven't gotten there yet. So if you wanted
to use HSP, we would be happy to accept a feature request from you. It
would be great to be able to have actual use cases to work with to
help the design of such form validation.

Easy support for SQL databases is another feature high up on the wish
list. Right now it should be about as easy as as from any other
Haskell application, except...

...HSP also currently only supports CGI, but that's perhaps the number
one priority to get it working in different environments. We were
thinking primarily of using the HAppS server utility as a runtime
environment, but FastCGI support would perhaps be an even easier task.
Again, a feature request would be most welcome, with some ideas for
what you want to get out of the FastCGI integration.

Also, one of the explicit design goals of HSP from the very beginning
has been to make it easy to understand for non-Haskell users. Just
like PHP allows you to take the step from writing static HTML pages to
writing dynamic PHP pages without pause, we wanted to "lure"
prospective web programmers into the Haskell world and in the darkness
bind them... Maybe something for your co-workers? :-)

So to summarize, HSP is a very simple model - perhaps *too* simple
right now - and aims to support much of what you ask for in a not too
distant future. Please drop a few feature requests our way so we have
something tangible to work with.

Feature requests go here: http://code.google.com/p/hsp/issues/entry



More information about the Haskell-Cafe mailing list