I'm in the process of trying to better my approach to programming, and part of this approach is to read a recommended (and already hugely influential to me) book 'Clean Code' by Robert C Martin.
In the book, it says how important it is that each function or class should be doing one thing only, or at least as little as it should within reason.
I've been using Codeigniter for a recent project and my code doesn't do this at all, but I'm unsure of the right way to do this in Codeigniter.
For instance, in some of my controllers I have methods that do rather a lot, or more than 'Clean Code' would recommend anyway. But I'm not sure where is best to break up the code to...
Do I use private methods within my controllers to tidy things up, but then run the possibility of having lots of methods in my class when I have a few private methods for each public method/page.
Do I split each public method/page to it's own file and avoid too many methods and private methods as stated above.
Do I make new classes of my own and put them in the libraries folder, and have a library for any times when my methods or classes are doing too much in the controllers.
If anyone has an example of a well written CodeIgniter script that'd help a lot too so i can look at how a more experienced developer goes about problems.