I am developing a mobile application that can be run on mobile devices (with OS such as Android, iOS, WP7 ...). This application will receive data from an online database, then save it in a local database on the device and I can do CRUD with data
Nice!!!
What technology should I use to create a webservice? (RESTful / SOAP ...?)
Iβll go for REST services.
REST has advantages when:
- You have a set of resources that you want to manage.
- You want to support navigation between resources.
- You need scalability.
SOAP has advantages when:
- You want to publish a description of the web service (using WSDL). WSDL 2 can also describe a RESTful web service. WADL is an alternative to WSDL for RESTful web services.
- You want to use security, etc. that rely on the use of SOAP headers or some similar mechanism in which data is added and removed from the request.
- You need improved tool support.
- You want to check platform compatibility.
What type of return data can be easily processed? (XML / JSON ...?)
I personally switch to XML. This is not a criterion that is easy to handle. About performance in mobile applications. JSON is usually smaller than an XML document, and there for faster work with. JSON can be parsed more efficiently because it can be parsed as JavaScript, which the built-in eval () function will do for you.
How to synchronize between a local database and a database on a host?
Create a service that contains a timer and starts in the background. Start the REST service at intervals to get the latest values. But since this is a survey question, it is inefficient and has less performance. In another approach, PUSH notifications will be used. As soon as any changes occur on the server side, send a push notification to the client (mobile) and, therefore, perform the operations of the local database.
iOS, Android, WP7 ... accept to load an external url in apps?
I did not understand this moment. What do you really want?
Should I use single-page application technology?
Single page technology is very good. But it will depend on your business. If possible, use it. Just create different HTML pages.
I will create an application using a cross-platform structure, and it will work with a local database. I just handle the synchronization between the local database and the host database. Problem: what is the best database and the best foundation for this?
The choice of database will depend on the choice of cross-platform mobile communication platform. Telephone service is exactly what you need. And the database will be sqlite . Phonegap provides an API for storage, so you can easily access the database on another mobile platform.