[Catalyst] Controllers vs Models

Dominique Quatravaux dom at idealx.com
Thu Jun 2 18:01:02 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Storrs wrote:

>
> What do the rest of you see as the dividing line between a
> Catalyst::Model and a Catalyst::Controller object? When you are
> creating a new object, how do you decide which hierarchy it belongs
> in?

Personally I find the following rule of thumb useful (of course it's
not a silver bullet): if it could be used in a non-Web environement
(for example in a crontab), then it is part of the Model. If not, it
is probably part of the Controller.

You may find more enlightenment on the Portland Pattern Repository
Wiki: I found it to be an excellent resource for this kind of discussion.

http://c2.com/cgi-bin/wiki?ModelViewController

- --
Dominique QUATRAVAUX                           Ingénieur senior
01 44 42 00 08                                 IDEALX

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCny08MJAKAU3mjcsRAr+7AKCpbfG8u8A4Aqarn+S8J0qDtItuJgCfe1Lc
7Fp89h965mP9yA3pQhcxero=
=YZGD
-----END PGP SIGNATURE-----





More information about the Catalyst mailing list