@Grant Cox
I agree with you.
However, I find myself putting a lot of code into controllers. In many
cases my models are quite thin while controllers are rather thick.
One reason my controllers become thick is that it's easy for me to
test out new methods while developing them. Just access them via URLs
from browser (Turn on debug, use pr() and set autoRender to false).

I tend to put real business / application logics in Model. For me it's
fine for controller methods to do data (array , string) manipulation/
preparation before setting variables for views.


On Dec 13, 8:48 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> It should be in the model - as should all "data retrieval" functions.
> Put as much stuff in the model as you can - the controller should just
> parse the request to see what model functions should be called, then
> set() this for the view.  While some processing in the controller is
> inevitable, models are much easier to unit test than controllers and
> so should contain the majority of your application code.
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to