CodeIgniter Forums

Full Version: Maximum lines of controller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just an easy question maybe,,how many maximum lines of your controller?
I continue previous programmer, so it is not easy to change what he had done in the website, and almost all function is in one controller.
Day to day if we need new function, yes we put it again and again in that controller.
Now mine is around 1500 lines.
Is it much? Or still not much ?
There are no hard limit, it's a matter of readability (and small performance). It's easier to debug code if it just a reference to a library instead of putting all logic inside a controller. So it's easier to find things and re-use it, as it's not bound to your controller.