[Catalyst] Program the logic

Nilson Santos Figueiredo Junior acid06 at gmail.com
Thu Jun 29 19:45:20 CEST 2006


On 6/29/06, John Napiorkowski <jjn1056 at yahoo.com> wrote:
> writing monolythic cgi type applications.   Personally I put all the logic
> having to do with manipulating the database into my model class.  So things
> like adding/removing users or very common searches I put there.  Anything
> that more than a single controller might want I put in the Model.

I think this really boils down to what you call application logic.

Manipulating the database (i.e. what DBIx::Class does) isn't the kind
of logic I was talking about. I meant actual business logic. This
means things like validation (not that the other layers shouldn't
validate data), access control, bridging your model and your view,
triggering model actions, etc.

IMO, the controller should be responsible for the higher level logic
involved in an application while the logic contained in the model is a
lower level (i.e. implementation details), usually data oriented,
logic.

-Nilson Santos F. Jr.



More information about the Catalyst mailing list