[web-devel] Re: ANNOUNCE: yesod 0.2.0
Chris Smith
cdsmith at gmail.com
Mon May 24 12:47:27 EDT 2010
Just one comment (in a few parts).
On Mon, 2010-05-24 at 17:47 +0300, Michael Snoyman wrote:
> 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.
That seems to be overstating the case a bit. Snap is designed to write
applications directly on top of it, and in that sense acts as a
framework. Some of the difference you're seeing likely comes down to
preference about how heavy the "framework" ought to be.
> * 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.
Snap does provide a form of routing requests, and even of parsing data
from the contents of the URL. It looks to be based on combinators
similar to what Happstack does, with the exception that capturing
variables from URLs is done in a relatively braindead way by adding
special syntax with colons inside strings.
The point here is, Snap does something different; not necessarily
something worse. We all have our preferences. Treating Snap as a new
underlying server implementation on top of which to layer WAI and Yesod
is possible, but rather missing the point. Much of what I get from Snap
is that we can dispense with some of the unnecessary complexity and just
solve problems.
Then again, I've also built three or four significant internally used
web applications with Happstack, and have yet to use happstack-state for
anything but working through tutorials. Could be I'm just afraid of
change...
--
Chris Smith
More information about the web-devel
mailing list