On 9/27/06, Chris Hartjes <[EMAIL PROTECTED]> wrote: > Placing data validation and other data > munging in the model seems to be the way of this definition. Food for > thought, that's for sure.
I second that. Data validation rules (or business logic/business rules) should be enforced on your data at all times - that's their nature. If you implement business logic in controllers, you run the risk of duplicating yourself when you use the same model in another controller. Even worse, if you happen to forget the rules in the other controller, or implement them slightly differently, your database may become (functionally) corrupt. Therefore, I would suggest to everybody to implement business logic as close to the persistency layer as possible (*). For CakePHP, this means the model. Martin (*) no offense, I know this might trigger a lot of opinions about n-tier application architecture ... -- Martin Schapendonk, [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---