I've written a little sample program that shows how you can do
continuation-based web programming in Haskell. It currently runs on
top of Happstack (it could easily be adapted to other platforms). I am
quite interested in your thoughts on this. I've put a self-contained
example online at http://gist.github.com/260052
Although there are some limitations to this approach, this is how I
would like to write my websites in Haskell. I'm currently
investigating other approaches as well (e.g. an arrow-based approach),
but just I thought I'd share it.
-chris
I find it not easy to read because of the choice of names.
E.g. You call a web continuation a Web. Why not Continuation or
WebContinuation? Similarly runWeb. Does this mean runWebContinuation?
And runPage for a function that ignores the request. No doubt there's
logic in that, but if it were called ignoreRequest, I might find it
easier to read the example.
Anyway, it looks very interesting. I might try converting my current
effort for an image gallery to that style, and see if it reads easier.
--
Colin Adams
Preston,
Lancashire,
ENGLAND
That's really neat. How about a link to this on the happstack.com
tutorials page?
John
How is it similar to or different from WASH/CGI ?
- jeremy
> --
>
> You received this message because you are subscribed to the Google
> Groups "HAppS" group.
> To post to this group, send email to ha...@googlegroups.com.
> To unsubscribe from this group, send email to happs+un...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/happs?hl=en
> .
>
>
I think it could be altered and extended to be serializable and work
for multiple users. I have some ideas for that which I'll be testing
(hopefully somewhere in the next couple of weeks).
I just wanted to share this as inspiration, you should definitely not
yet use this for real-world things...
-chris
http://docs.plt-scheme.org/web-server/stateless.html#(part._.Serializable_.Continuations)