Matija Grabnar ha scritto:
On Tue, 8 May 2007, Perrin Harkins wrote:
The way most people use Rails and Catalyst is somewhat different from
the MVC concept.  The traditional role of the controller is just to
map user input to a method, and nothing more.  All of the business
logic is supposed to be in the model.

But, thinking back to Catalyst docs, when they talk about constructing a model, they mostly just give you the line that will pull in an existing DBIC set of classes, not how to make your own model that just calls DBIC (or even, doesn't call DBIC at all).

I agree. I've read mst and others talk about how the "core" of the app should be independent of Catalyst, and how Cat's Model:: classes should be used as a way to expose that core to Catalyst. Unless I missed some new stuff, I haven't seen any code example of this "best practice" in the docs, the trac site or elsewere.

I think this organizazion of the codebase could be useful in many projects, so I think it's worth writing a tutorial and/or one or two (possibly) realistic examples.

The reason I'm asking this is that the docs don't promote this style, and moving from the "build the cat app and make it grow" style to the "build the *app* and expose it through cat" is not obvious.


Does anybody know of a place where creating your own model is documented in more detail? I'd like to read it.

I'd like to read it too.


_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/




--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to