[web-devel] Chris Done on a new pure Haskell pgsql binding and MVC
greg at gregweber.info
Fri Jun 10 16:12:47 CEST 2011
I am all for increasing the M in the MVC of Yesod. In a simple REST app
where resources closely map to the data modeling, this can be less of an
issue. Basically you need the M once you would have duplicate model code
between any 2 requests. Chris is advocating a fairly strict separation. I
think it can still be simpler to put a read query in a controller. Once that
query (or a part of it) is needed elsewhere it should definitely be named
and reused. Updates do need to maintain invariants and thus should generally
stay out of the controller. I would like to come up with a good system for
maintaining invariants and propagating violations to forms, and other useful
systems for doing more than just taking the query out of the controller.
Let us know if there is anything stopping you from separating out code into
a Models directory right now.
On Fri, Jun 10, 2011 at 4:00 AM, Aur Saraf <sonoflilit at gmail.com> wrote:
> None of us should miss this. It especially raised a few questions in
> my head about the architecture of my site.
> web-devel mailing list
> web-devel at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the web-devel