
On Mon, 24 May 2010 17:47:53 +0300
"Michael" ==
wrote:
Michael> I would say that Yesod and Snap are very orthogonal Michael> projects. Without offense to the Snap authors, I don't really Michael> think Snap is a framework; it's much more low-level than Michael> that. As they put it, it's at the level of a Java servlet Michael> container. In that sense, it's slightly higher-level than Michael> WAI, but far more low-level than Yesod (or turbinado, Michael> happstack, etc). I'd agree with that, but they say: "Higher-level facilities for building web applications (like user/session management, component interfaces, data modeling, etc.) are planned but not yet implemented..." and, moreover, they aim at: "Snap aims to be the de facto web toolkit for Haskell... ", so it looks that present release is not the end of the story. Michael> I did some work after the Snap release to actually get Yesod Michael> running on top of Snap. Gregory has been very helpful, and Michael> will hopefully be releasing a newer version of snap-server Michael> that provides the functionality I'm missing. (Basically, Snap Michael> processes url-encoded form data, while WAI specifies that the Michael> POST body be passed to the application.) Would it be better option for shared-hosting scenario and FCGI serving? Michael> * Yesod uses the WAI definition of enumerator while Snap uses Michael> the iteratee package. The former is much simpler, the latter Michael> more powerful. I'd be very interested in a performance Michael> comparison of the two, my instinct tells me the former wins. I haven't been able to grok either of them...all I can say is that I understand this is hot topic in Haskell, and if one wants to dive into web development with Haskell, there is need to understand them more (hopefully not fully). Michael> * Snap has Heist, which is an XML based templating system, Michael> while Yesod uses Hamlet. However, neither framework is Michael> actually tied down to these templating systems. In fact, Snap Michael> doesn't even depend on Heist. Hamlet looks cool to me... /me does not like XML stuff... Michael> * Yesod has type-safe URLs, I don't believe Snap has any Michael> similar feature. Hmm, this is an important issue and one of the selling tickets to use Haskell instead of e.g. Python/Django (which we recently abandoned). Michael> * Some design decisions, notably they use a mutable states for Michael> modifying request and response values while Yesod uses a Michael> Reader for the request, and writer for response headers and Michael> actually returns a value for the response body/content type. What are some of the implications of the above design difference? Michael> I'm sure there are many more differences, but the main point Michael> is this: these two projects are very different types of Michael> frameworks. And I hope and expect that the two projects will Michael> have some cross-polinization going forward (in fact, we Michael> already have). Thank you for the input. It looks that it would be nice to make another comparison when (hopefully) Snap gets some more higher-level stuff and when Yesod will have some solution for persistence (hopefully with the ability to use RDBMS). Sincerely, Gour -- Gour | Hlapicina, Croatia | GPG key: F96FF5F6 ----------------------------------------------------------------