[web-devel] What frameworks are there?

Michael Snoyman michael at snoyman.com
Thu Apr 8 17:52:08 EDT 2010


You're 100% correct about the state of documentation. I think we need to
figure out a nice, centralized place to put up quality Haskell
documentation, and actually work at it.

The obvious place is the Haskell wiki, but a downside is that many people do
not have accounts. For github projects- like Yesod- we could use the wiki
pages there, but that's not exactly standardized.

In addition, I think it will help library authors to know *where* the
documentation is lacking. For example, I know that I haven't written much
documentation on the Handler datatype in Yesod. However, I'm not sure if
anyone actually *cares* about that, or if instead a nice introduction to the
authentication framework would be more welcome.

I assume we won't come up with any great solutions to the documentation
issue in the immediate future; in the interim, if people want to see some
documentation on any of my packages, please do one of the following:

* File an issue on the appropriate github projects making a request for
documentation. Be as clear as possible.
* Start a Wiki page (either Github or Haskell wiki) with your questions and
e-mail me to let me know it's there.
* Send an e-mail to the web-devel list with the question.
* As a last resort, e-mail me privately. I'd much prefer that these
discussions happen in public so that others can learn and contribute.

I'm more than open to better suggestions. I'll also appreciate any help in
improving my documentation.


On Thu, Apr 8, 2010 at 11:07 AM, Kyle Murphy <orclev at gmail.com> wrote:

> I guess my biggest problem with the state of web development in Haskell as
> it currently stands is that there's no good easily accessible tutorials on
> how to go about doing things. There are lots of example programs scattered
> around, and some of them are even documented reasonably well that you can
> look at them and sort of figure out how they go together using the various
> pieces, but once you try to go beyond those specific bits and pieces you end
> up wandering off into the weeds. What I'm looking for most of all is one set
> of documentation I can look through and figure out how to put a simple
> application together that supports handling GET/POST requests, storing and
> retrieving session info, and ideally a simple long term storage solution
> such as HSQL.
> Right now I feel like just to put together a simple page that handles form
> submission I need to have mastered 4 or 5 different libraries, all
> documented in different locations. When I first started trying to do web
> development in Haskell I looked at the Happstack tutorials, and that worked
> fairly well, I was able to take a simple paste bin application and modify it
> to add some javascript into the generated page, however even that fairly
> trivial modification meant I had to go digging through the Text.XHTML
> documentation, which consisted solely of the automaticlly generated hadock.
> Furthmore I'm still not entirely sure how the various pieces of Happs
> actually fit together, or what pieces are provided by Happs, and what pieces
> are provided by other external libraries. Yesod is a similar situation in
> which I'm not entirely sure what's provided where and where to go to find
> the documentation of that. I'm sure an expert Haskell developer can just
> glance over the hadock for a library and figure out how to put all the
> pieces together, but as a Haskell newbie I often get lost trying to figure
> out how to do things that in other languages would be fairly trivial. Most
> of the time when I'm lost on how to do something it isn't even because what
> I want to do is terribly difficult, it's just that the documentation on how
> to do something assumes that you essentially already know how to do it and
> are just looking for clarrification on the details, a situation that I
> usually resolve by either trial and error, or by looking for some piece of
> code somewhere that does what I want and trying to puzzle out how it
> actually goes about doing that.
> Part of this seems to be caused by most of the libraries/frameworks being
> documented solely in hadock, which is ok for a quick reference, but sucks
> for trying to learn how to use a library/framework. Even though it's true
> there's a lot of usefull info contained in just the signature of a function,
> if that's the first time you've been exposed to that function and aren't
> entirely sure of its purpose, that information isn't enough to really
> understand the function, at least for non-trivial functions. The big
> frameworks like Happs, Turbinado, and hopefully soon Yesod, do seem to be
> fairly well documented, but the fact that they're built on top of a bunch of
> the other libraries like HSQL, HStringTemplate, and Text.XHTML that aren't
> well documented undermines the ability to fully understand them, as before
> you can really make the most use out of their documentation you must first
> go puzzle your way through the poor documentation of all the support
> libraries.
> Further complicating matters is the scattered way in which libraries are
> documented. For all I know, there's really excellent documentation for
> Text.XHTML, but just looking at it on hackage, and a quick google search
> doesn't seem to reveal anything particularly useful. The hackage page for
> Text.XHTML has a link for more info, but going to the page that supposedly
> contains more info I'm greeted with a 404 page. It would be one thing if
> this was the exceptional case, but from what I've seen that's pretty much
> par for the course.
> -R. Kyle Murphy
> --
> Curiosity was framed, Ignorance killed the cat.
> On Thu, Apr 8, 2010 at 10:15, Sebastiaan Visser <sfvisser at cs.uu.nl> wrote:
>> Kyle,
>> What functionality do you need? What do you want this `framework' to offer
>> you? There are plenty of packages for Haskell that help you to write web
>> applications, all of them offering some functionality. It's very unlikely
>> you'll find one single package that satisfies all your requirements.
>> I advice you to look around and see what package there are and how these
>> might help you.
>> For example, I'm currently thinking about building a web application
>> using:
>>  - The Salvia server interface (not surprisingly, this one is written by
>> me)
>>  - The Haskell bindings to the Berkeley XML database for long-term
>> storage.
>>  - The Salvia-session package for in-memory session storage.
>>  - The HXT xml library.
>>  - The regular-xmlpickler for generic XML printing/parsing (using HXT
>> picklers).
>>  - The BlazeHtml package for building up HTML pages (fast).
>>  - The formlets package for generating flexible web forms.
>>  - The CleverCSS package (and salvia integration) for improved css
>> support.
>>  - probably even more...
>> Although I agree it is not always easy to get a grip on what are the best
>> techniques available for Haskell web development, there are plenty of tools
>> available. It will probably take some time to get to know all these
>> libraries, but due to the clear separation of concerns and Haskell's neat
>> type system, integration is almost never a problem.
>> I sincerely hope this might help you and does not scare you :-)
>> Regards,
>> Sebastiaan
>> On Apr 8, 2010, at 3:29 PM, Kyle Murphy wrote:
>> > -R. Kyle Murphy
>> > --
>> > Curiosity was framed, Ignorance killed the cat.
>> >
>> >
>> > On Thu, Apr 8, 2010 at 04:17, Alistair Bayley <alistair at abayley.org>
>> wrote:
>> > Uh...
>> >
>> > >From http://hackage.haskell.org/packages/pkg-list.html#cat:web
>> >
>> > 1. happs
>> > 2. yesod
>> > 3. hack
>> > 4. salvia
>> > 5. kibro
>> > 6. hsp  (barely a framework, I think)
>> >
>> > From the descriptions of those all but kibro, and happs/yesod which have
>> been mentioned, I would classify as bits of frameworks, rather than a full
>> framework like happs or yesod. Kibro looks interesting, but I can't find any
>> documentation at all but the rather meager hadoc info on hackage itself,
>> which tells me next to nothing about the framework. It also looks like Kibro
>> is a CGI framework and not a full application server.
>> >
>> > Other frameworks not on hackage, possibly not under active development:
>> >
>> > 7. hvac (
>> http://fmapfixreturn.wordpress.com/2008/03/23/ann-hvac-01b-a-transactional-declarative-framework-for-lightweight-web-applications/
>> > )
>> > 8. turbinado ( possibly abandoned:
>> http://github.com/alsonkemp/turbinado )
>> > 9. WASH  ( http://www.haskell.org/haskellwiki/WaSh ,
>> > http://www.informatik.uni-freiburg.de/~thiemann/WASH/<http://www.informatik.uni-freiburg.de/%7Ethiemann/WASH/>)
>> >
>> > Hadn't heard of Turbinado and I'm checking that out now (it at least has
>> some documentation even if a few of the links seem to be broken). WASH
>> likewise looks interesting, although I'm not terribly thrilled about using
>> CGI (I will if I have to, but I'd be more comfortable with a full
>> application server). hvac looks like it has potential, although the lack of
>> documentation probably means I won't be using it.
>> >
>> > There are some other bits which don't qualify as full frameworks, but
>> > might well be useful in their own right:
>> >
>> >  - HStringTemplate
>> >  - formlets
>> >
>> > And there's bound to be stuff that I've missed.
>> >
>> > Alistair
>> >
>> > Yes, and I've actually looked at both HStringTemplate and formlets
>> (briefly) with the idea to either use them in conjunction with one of the
>> other frameworks (Yesod I know uses HStringTemplate, at least for the
>> moment, and I think Happs has some integration with formlets).
>> >
>> > As was mentioned by Gour in another followup to this, there's also
>> Hakyll, which is an interesting possibility, but I'm not sure I'd be happy
>> with the result. In particular it would ruin my plans for integrating with
>> Google Checkout as I was planning on using the server side XML interface.
>> >
>> > Based on the feedback I've gotten so far, my list of possibilities in
>> order of preferance seems to be:
>> > 1) Yesod
>> > 2) Turbinado (might change, need to look at this more)
>> > 3) Happs
>> > 4) WASH
>> > 5) Hakyll (if I can stomache using static generation)
>> > 6) All the poorly documented ones like hvac, and kibro
>> > 7) Roll my own out of the various pieces
>> >
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100408/d4399dfb/attachment-0001.html

More information about the web-devel mailing list