I have a website that I built on the CodeIgniter framework. It implements the MVC architecture.
My dilemma is: I am developing applications for mobiles. A little research told me that mobile apps cannot connect directly to MySQL databases and thus, I need to have a service layer in between - in my case, they will be PHP scripts.
Is it possible (and should I) for me to integrate these scripts into my MVC architecture. If yes, how should I go about it?
Currently, I have this in mind:
Would that be the correct way to implement it?
This is my first time implementing something like this so I want to make sure I'm not missing something.
Better yet, create a full REST server for your mobile app to use. You can get an idea of how easy it is with this tutorial:
http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/
This will have a link to the library as well,