Don't forget: Fat Model, Skinny Controller
Move all your controller queries into the model as methods, that
should slim down the controllers a bit
On Apr 1, 1:27 pm, euromark <dereurom...@googlemail.com> wrote:
> sure
> i did that with the user controller (used to be > 300kb)
>
> e.g. controllers:
> account (for changing account infos)
> members (pagination and profiles)
> overview (user statistics and stuff)
> with their own views!
>
> just use
> $uses = array('User');
> in all controllers to be able to use the same model+table
>
> On 1 Apr., 12:27, Jeremy Burns <jeremybu...@me.com> wrote:
>
>
>
> > You could move the functionality to a component?http://book.cakephp.org/view/993/Components
>
> > Jeremy Burns
> > jeremybu...@me.com
> > On 1 Apr 2010, at 11:25, Jonas wrote:
>
> > > Hello,
>
> > > Is there some recommended way of splitting a controller into several
> > > files? It's getting a bit too large for my taste but I cannot move the
> > > functionality out to the models. I would rather have the possibility
> > > of putting a separate page in a separate file. Is this possible with
> > > Cake?
>
> > > It's a booking site btw if it makes any difference.
>
> > > Regards,
> > > Jonas
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google Groups "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> > > To unsubscribe, reply using "remove me" as the subject.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment