[web-devel] Re: ANNOUNCE: yesod 0.2.0

Michael Snoyman michael at snoyman.com
Mon May 24 10:47:53 EDT 2010


On Mon, May 24, 2010 at 5:35 PM, Gour <gour at gour-nitai.com> wrote:

> On Mon, 24 May 2010 15:26:02 +0300
> >>>>>> "Michael" == <michael at snoyman.com> wrote:
>
> Hello Michael,
>
> Michael> I'm very happy to announce the release of yesod 0.2.0. Yesod
> Michael> is a Haskell web framework for type-safe, RESTful web
> Michael> applications.
>
> Congratulations for new release and enhanced web-site!
>
> Michael> The next feature I'm targeting for Yesod is persistence. If
> Michael> anyone has any thoughts to share on this topic, please send me
> Michael> an e-mail.
>
> Do you have any rough idea about deploying RDBMS in Yesod?
>
>
> Otoh, this release of Yesod is coming along the 1st public release of
> Snap framework...pretty exciting time for Haskell web development.
>
> However, for someone who is still using Hakyll for his web needs (and
> I must say: "I like it!"), but may ponder into some Haskell framework
> in the future, I'd be interested to hear about some comparison between
> Yesod & Snap as far as features, methodology, target users, ease of
> deploying etc. are concerned?
>
>
> I would say that Yesod and Snap are very orthogonal projects. Without
offense to the Snap authors, I don't really think Snap is a framework; it's
much more low-level than that. As they put it, it's at the level of a Java
servlet container. In that sense, it's slightly higher-level than WAI, but
far more low-level than Yesod (or turbinado, happstack, etc).

I did some work after the Snap release to actually get Yesod running on top
of Snap. Gregory has been very helpful, and will hopefully be releasing a
newer version of snap-server that provides the functionality I'm missing.
(Basically, Snap processes url-encoded form data, while WAI specifies that
the POST body be passed to the application.)

If you want a real comparison of where the two differ on things, I guess
this will suffice:

* Yesod uses the WAI definition of enumerator while Snap uses the iteratee
package. The former is much simpler, the latter more powerful. I'd be very
interested in a performance comparison of the two, my instinct tells me the
former wins.

* Snap has Heist, which is an XML based templating system, while Yesod uses
Hamlet. However, neither framework is actually tied down to these templating
systems. In fact, Snap doesn't even depend on Heist.

* Yesod has type-safe URLs, I don't believe Snap has any similar feature.
However, as I mentioned already, Snap is lower level than Yesod, so you
could easily implement type-safe URLs on top of Snap.

* Some design decisions, notably they use a mutable states for modifying
request and response values while Yesod uses a Reader for the request, and
writer for response headers and actually returns a value for the response
body/content type.

I'm sure there are many more differences, but the main point is this: these
two projects are very different types of frameworks. And I hope and expect
that the two projects will have some cross-polinization going forward (in
fact, we already have).

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100524/3fff0b80/attachment.html


More information about the web-devel mailing list