Grouping related categories into a single controller or split apart?

#1
[eluser]gwerner[/eluser]
Is there a best or common practice with regards to the number of methods in a controller? I'm working on a backend admin and some of my controllers are becoming rather large in size. By large I mean long. And they become more difficult to traverse the longer they get.

I'm currently building a section that is used to log changes to the main site. Currently the single controller structure is like:

Changes
index
add
modify
save
remove

approvals
addapproval
modifyapproval
saveapproval
removeapproval

The controller Changes contains a couple of sub-categories, "changes and approvals". The approvals portion is a database of individuals who are responsible for approving the changes made to the site. Fairly simple. However, the controller is getting quite long and what if I add a another group of people, those who are actually editing the site. These sub categories are related to the top category Changes.

Should I separate the two into their own controllers even though they are connected to some degree? Or, leave as is? Maybe it doesn't matter and it's user preference. I'd just like to get a quick opinion before I create a mess. Thanks to any who can offer guidance.



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.