actually, the performance hit is minimal!
it was just a cleaner way of grouping the actions (see above)
now they have a clean structure - in the url they are called as well
as in which file they are
and you dont have to use extensive routing to achieve that
so if there is no reason other than perf
My controller is also around 300 kb. I've kind of inherited it, not my
basic design and I don't have time (or permission) to make any changes
like pushing functionality down to the models. The models is also
based upon a 3rd party API so there is a bookingservice which is
modelled in the booking.ph
300kb sounds very large for even a complex controller.
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 wrote:
> sure
> i did that with the user controller (used to be >
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+tab
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