Hi,
after 6 successful projects with exciting ExpressionEngine I’m turning to CI to getting deeper in that MVC thing ![]()
I’ve just played a little bit with the framework last days and read the docu. Yesterday I’ve got the book (David Upton) and read some pages. Therefore I have a question:
In my understanding the MVC pattern is working as this:
Class My_controller
this->load->my_model
data = this->my_model->getdata()
this->load->my_view(data)
Class My_model
function getdata()
In the book the view call happens via an indirect way like this:
Class My_controller
this->load->my_model
this->my_model->display()
Class My_model
function display()
data = this->db->query(anything)
this->load->my_view(data)
Sorry for my simplified syntax :D
I would prefer the first snippet but I don’t know whether it is in the straightfoward MVC theorie? Or does it no matter?
Thanks,
2nd
