Controller Structure - many functions or seperate |
[eluser]newuser2[/eluser]
I am always on the lookout for best practices and one of the things that has been bothering me has been controller layout. For example, there is a 'Wiki' controller with at least 6 functions along the lines of 1. wiki-add 2. wiki-delete 3. wiki-view-history 4. wiki-edit 5. .... In my routes, I have setup for each URL to point back to its specific function within this 'wiki' controller. It works fine the way it is, although I'm not sure if I should separate each function in its controller. The code is <40 lines for some functions. After having a look at a real CI example, I think I should split them up. |
Welcome Guest, Not a member yet? Register Sign In |