Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread Zbigniew Lukasiak
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. In

Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread Bill Moseley
On Wed, Jul 18, 2007 at 09:39:25AM +, 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

Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread Pedro Melo
Hi, On Jul 18, 2007, at 1:07 PM, Bill Moseley wrote: On Wed, Jul 18, 2007 at 09:39:25AM +, 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

Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread John Napiorkowski
--- Bill Moseley [EMAIL PROTECTED] wrote: On Wed, Jul 18, 2007 at 09:39:25AM +, 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

Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread Bill Moseley
On Wed, Jul 18, 2007 at 07:49:50AM -0700, John Napiorkowski wrote: I've come to the reluctant conclusion that for anything other than trivial applications you will need to validate in a couple of places. Obviously the database should be properly designed to enforce integrity rules. If you

Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread Kee Hinckley
On Jul 18, 2007, at 10:49 AM, John Napiorkowski wrote: validating types for your columns. I do this for very common things like email addresses. Postgresql is nice for this since you can create custom types and domains using Perl as your procedural language. pet-peeve Please tell me you're

Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread Dave Rolsky
On Wed, 18 Jul 2007, Kee Hinckley wrote: 2. Biz-logic Things you've specified for you application. E.g. We need an email address for all new accounts 3. DB Constraints specific to the database and object model. E.g. Field length, required fields. The distinction between these two is

Re: [Catalyst] Making Controllers thin and Models thick

2007-07-18 Thread John Napiorkowski
--- Kee Hinckley [EMAIL PROTECTED] wrote: On Jul 18, 2007, at 10:49 AM, John Napiorkowski wrote: validating types for your columns. I do this for very common things like email addresses. Postgresql is nice for this since you can create custom types and domains using Perl as your

[Catalyst] Making Controllers thin and Models thick

2007-07-17 Thread Kee Hinckley
[Was: Re: [Catalyst] Command-line utility using Controller - examples?] On Jul 17, 2007, at 9:21 AM, Ronald J Kimball wrote: (The Controller in this case is probably not as thin as it should be. :) The issue I had is that Catalyst makes it very easy to do the database part of the Model,