9 out of 10 times, the answer is in the Model - it's more reusable,
easier to (Unit) test, and (imho) makes the controller code a lot
simpler and clearer.

Look up "fat models, skinny controllers" for more info...



On Jun 20, 6:35 am, AhmadShahzad <[EMAIL PROTECTED]> wrote:
> Hello,
>        Can anybody tell me that where should i put my business logic. In
> model or controller? What are the advantages and disadvantages of putting
> business logic in controller? Likewise what about putting business logic in
> models? What is the best practice?
> --
> View this message in 
> context:http://www.nabble.com/Business-logic-in-Controller-or-Model.-tp180233...
> Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to