Generally, the division of labor of "business rules" is between the model and the controller, and there is often some overlap in terms of the responsibilities of each. Validation is a good example: it usually makes sense to do validation in the model, but sometimes you need external information, i.e. session data, in order to do the validation. In this case it would be the responsiblity of the controller.
The rule of thumb is to do what makes sense. If there is a piece of logic which makes sense being completely contained within the model, then it should be. However, don't try to give the model more data than it needs. By default, a model is constrained to accessing it's own data, and the data of it's related models. If it requires anything outside of that, the logic should go in the controller. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
