every code example I see does load its models, helpers and stuff like that in the controller function.
For example
Code:
function Test()
{
parent::Controller();
$this->load->model('test_model');
}
While I do all this stuff in config folder and autoloading that. Is this bad approach? If I understand it correctly the only reason why to load it only in certain controller is a speed right?
[eluser]Stefan Hueg[/eluser]
Speed and memory consumption, yes. CodeIgniters approach, compared to other frameworks, is: Load as few files as possible.
That's the secret ingredient why I choose CodeIgniter among all others