A layer between controllers and models |
[eluser]go4sachin007[/eluser]
Hi, I am building a site cum software using codeignier. In this i want to have a layer between controllers and models like services. So that i can use PHPUnit and other APIs in it. Basically the purpose of this layer is that not direct communication between controllers and models. Controllers communicates with service layer and service layer communicate with database(models). Can this scenario be implemented via codeigniter as i need it for my project. I know the flexibility of codeigniter framework. It is a wonderful framework and i have developed my websites with the help of this great framework. So i am expecting a good feedback from you guys. Thank you in advance. go4sachin007
[eluser]wiredesignz[/eluser]
The model already is the service layer between the application controller and the database.
[eluser]go4sachin007[/eluser]
Still is there a way to introduce a layer? Thanks
[eluser]go4sachin007[/eluser]
I am talking the things as is explained in http://www.cmjackson.net/2010/01/18/mvc-...hitecture/ can we do that in codeigniter Thanks in advance.
[eluser]jmadsen[/eluser]
CodeIgniter is php If you can do it in php, you can do it in CodeIgniter. I often will use libraries in a way similar to what he seems to be describing in the article. Controllers call a library with the business logic & multiple model function calls inside a "wrapper" function |
Welcome Guest, Not a member yet? Register Sign In |