[Catalyst] Shoot out -- Catalyst / RoR / Other MVC apps --

Perrin Harkins perrin at elem.com
Tue May 8 16:28:59 GMT 2007


On 5/8/07, Luis Azevedo <braceta at sapo.pt> wrote:
> What I still not understand is why he says RoR isn't MVC O:).

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.

Most users of RoR and Catalyst put a bunch of code in what gets
referred to as the controller and call auto-generated ORM classes the
model.  Most of the code they put in the controller is really the
model too.

If you just change your naming and refer to RoR/Catalyst controllers
as models and your web server + the RoR/Catalyst code as the
controller, it would fit the MVC concept better.  It won't solve the
issue of wanting to reuse your model code in a non-web environment
though.  For that, you'd need to keep that code in some kind of
separate model classes, or fold it into your ORM classes.

All that said, the typical approach works fine for most people.  It
just doesn't fit MVC very well.  Maybe it needs its own name, like HDT
(Handlers, Database objects, Templates).

- Perrin



More information about the Catalyst mailing list