Welcome Guest, Not a member yet? Register   Sign In
1 or 5 controllers?
#11

[eluser]the_fury[/eluser]
I almost always tend towards breaking up large classes/files/methods. I like to be able to see what's going on at a glance. I would need a very good reason to keep that much code together.
#12

[eluser]wiredesignz[/eluser]
@the_fury,
I was going to say Welcome to CI forums, but then I saw your join date. So I'll say a belated Welcome to CI forums :lol:
#13

[eluser]the_fury[/eluser]
[quote author="wiredesignz" date="1205295017"]@the_fury,
I was going to say Welcome to CI forums, but then I saw your join date. So I'll say a belated Welcome to CI forums :lol:[/quote]

heh - thanks. I guess it has been a while.
#14

[eluser]adamp1[/eluser]
I think so far I'm going for the spliting the code up. It already has made it easy to find the method I want.
#15

[eluser]internut[/eluser]
After a whole lot of work and my controllers getting large ( i need to move to break code over to models ) I'm guessing I should be splitting things up.

I have a "Users" controller that basically is handling every aspect of user management.

add /save / edit / view user groups / view user group expirationss / view user lists/ etc

should I break it down into a controller each:

controllers are in an /admin/ sub-folder. So if I break them up instead of:

/install_folder/admin/users/add/
/install_folder/admin/users/edit/1
/install_folder/admin/users/groups/1

it would become:

/install_folder/admin/users_add/
/install_folder/admin/users_edit/1
/install_folder/admin/users_groups/1

more controller files but breaks things up much better.

I make so much more work for myself. Is that the route I should go? Based on this thread
I think so.

Can controllers go two folders deep? then I could do:

/install_folder/admin/users/add/
/install_folder/admin/users/edit/1
/install_folder/admin/users/groups/1

Then all user controllers could be in their own folder.

Thanks in advance and after any thoughts.
#16

[eluser]internut[/eluser]
From what I just tried do not believe I can go two folders deep in the controller folder.




Theme © iAndrew 2016 - Forum software by © MyBB