[Catalyst] Making Controllers thin and Models thick
Pedro Melo
melo at simplicidade.org
Wed Jul 18 15:05:48 GMT 2007
Hi,
On Jul 18, 2007, at 1:07 PM, Bill Moseley wrote:
> On Wed, Jul 18, 2007 at 09:39:25AM +0000, Zbigniew Lukasiak wrote:
>> Hi there,
>>
>> I am too working on a thick model component. It's a ResultSet base
>> class with functions bearing (provisional?) names: build_create and
>> build_update. They do params validation and update the database in a
>> transaction with data for both the individual record and related
>> stuff.
>
> Sounds like both you and Ken are pushing the validation into the
> model -- or rather the ORM layer. The model needs to do some
> validation, of course, and I like to push that into the RDBMS where
> possible.
there is another view: keep everything in the model and treat your
RDBMS as a simple data-store.
This is helpful in situations where your validations are complex or
heavy, and its easier to scale the server farm that runs your models,
than to scale the server farms that run your RDBMs.
Best regards,
--
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: melo at simplicidade.org
Use XMPP!
More information about the Catalyst
mailing list