I have a project where I have to develop a mobile application (Android) and a website. Since both of them have the same database / content and functionality , I want to write a common side for mobile and web applications.
Now I have two options:
To create a server-side RESTful web service to which my Android app and website (HTML / Javascript) will contact. I think this is not a convenient way to develop the site, because you filled in all the values ββof the HTML components using javascript to load the page.
Develop a web application with an MVC framework (e.g. CodeIgniter), where each page will have two views:
a) general HTML / CSS / Javascript page for website
b) JSON data for the mobile application. In this case, the mobile application will make an HTTP GET call for the URL: www.mySite / someParameters, and as a result, it will respond to JSON data.
Which one is better to choose?
Or do you have other suggestions?
web-applications architecture server-side software-design mobile-application
mariami
source share