PHP / MySQL site integration with App Phonegap

6

I'm creating a website and an App with Phonegap, I'm new to programming for mobile platforms.

This site has a database and I want this database to be available directly in the App, but I do not want access to removal in the database.

How can I do to send a request to the PHP site, and does it return me a result to be presented in the App using JS? Is it possible to do a BD cache in the App, make a copy daily, or when there is a BD update?

    
asked by anonymous 08.04.2014 / 01:30

2 answers

3

First you will have to choose a local database in PhoneGap, where MySQL is not available. Maybe SQLLite ... Then via AJAX make a request for a WebService configured on the server side (where MySQL is) to bring the contents of the central bank and update the site. This WebService can be created in PHP or any other language.

As mentioned, depending on the size of the database this may not be feasible, either because it generates too much traffic or because of the synchronization routine consuming too much device resources.

    
15.04.2014 / 06:18
0

Friend one way I found for this is through webservices. Regarding the issue of making a copy of bd is possible, you just need to see if it is really feasible since the application with phonegap suffers from slowing problems making the end user use a bit tedious.

    
08.04.2014 / 13:16