CodeIgniter Forums

Full Version: Separating the code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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.