Separating the code - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Separating the code (/showthread.php?tid=50638) |
Separating the code - El Forum - 04-02-2012 [eluser]ibnclaudius[/eluser] Am I separating the content of the controller, library and model correctly? What would you change? This is some kind of auth library... controller: http://pastebin.com/5E9H6HQS library: http://pastebin.com/rtuR4r1m model: http://pastebin.com/uFZnhgrs Separating the code - El Forum - 04-02-2012 [eluser]InsiteFX[/eluser] 1) I would use a MY_Controller to contain most of the Auth code. 2) I would autoload the session library and database being as they are used all the time. 3) autoload the url_helper. |