My personal opinion - one controller per 'type' of 'operation'.  I
think all actions that can be performed on a single object (not
necessarily a single model) should be managed in the one controller.
Different permissions to those actions should be handled by ACL.

I think different controllers for each role could get very messy, very
quick and lead to lots of duplicate code.

Geoff
--
http://lemoncake.wordpress.com

On Jul 19, 10:07 pm, Cacho <[EMAIL PROTECTED]> wrote:
> Hi
>
> I wonder which is the best way to make controllers.
>
> Explaining: My site home page will show data from various model
> (products, categories, etc). When somebody click in product link I
> think it should be redirected to a product controller but I think
> there are many operations in that controller: operations for the non
> logged user, for the logged user and for the admin user. And the
> problem is just the same with each controller.
>
> So, I wonder, which is the recommended way to it ? Should I use a
> single product controller that will allow operations according to user
> role ? should I use separate controllers for each role ?
>
> Could, please, someone give a little light in this matter (and samples
> if its possible) ?
>
> Thanks in advance
>
> J


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to