Re:Yesod in Production
by mercurial on Saturday July 20, 2013 @03:35AM
(#6074584)
I have to say that I've seen of Snap looked a lot closer to my favourite framework, Flask, than what I've seen of Yesod. The big problem, IMHO, is the lack of a good multi-database persistence story for Haskell. You have several good, mid-level database layers ({mysql,postgres,sqlite}-simple), but they don't even offer a common interface. And HDBC's performance, from what I could read, is not really top notch.
And then you have Persistent, which works in its own monad (I'm not sure if it works as a second level cache, because it's not terribly well documented) and with a good helping of Template Haskell tries to be an ORM. Unfortunately, it's not terribly powerful (numeric IDs only, no complex joins, and it doesn't look like you're expected to write the mapping between your model and the table(s) yourself, so forget about legacy databases).
Re:Yesod in Production
by jc79 on Saturday July 20, 2013 @06:33AM
(#6074851)
Well, you have http://hackage.haskell.org/package/esqueleto , that while not all-mighty-powerfull, it does allow for useful joins otherwise not available in the 'standard' Persistent API, while being compatible with it.
Re:Yesod in Production
by mercurial on Saturday July 20, 2013 @06:40AM
(#6074857)
Yesod is definitely more integrated (though you can use Persistent with Snap too). But I don't think I want to surrender so much control to an "ORM" layer which is not SQLAlchemy.
And then you have Persistent, which works in its own monad (I'm not sure if it works as a second level cache, because it's not terribly well documented) and with a good helping of Template Haskell tries to be an ORM. Unfortunately, it's not terribly powerful (numeric IDs only, no complex joins, and it doesn't look like you're expected to write the mapping between your model and the table(s) yourself, so forget about legacy databases).