Cross-Platform Mobile Application Solution Cross-Platform Mobile Application Solution database database

Cross-Platform Mobile Application Solution


How to sync between local database and database on host?

For synchronization, you can take a look at the open source project, OpenMobster's Sync service. You can do all types of sync operations

  • two-way
  • one-way client
  • one-way device
  • bootup.

Besides that, all modifications are automatically tracked and synced with the Cloud. You can have your app offline when network connection is down. It will track any changes and automatically in the background synchronize it with the cloud when the connection returns. Also, when new data is created in the Cloud, it is automatically synchronized with the local database using Push notifications.

Currently only native development is supported on Android and iOS. However, the next release which is 2.2-M8 (end of March) will support end-to-end integration with PhoneGap on Android and 2.2-M9 (end of April) will add iOS.

Support for PhoneGap will give you the flexibility to build the app using web technologies like HTML5, and JavaScript along with Sync for your local data using OpenMobster.

If you want to go pure native, then you still can use the Sync service and synchronize your local database with your remote database.

Let me know if you have more questions about the framework

Here is a link to the open source project: http://openmobster.googlecode.com

Good Luck!!!


Some suggestions:

  • If you're planning that your mobile application exchanges data with a server, i strongly suggest you to use RESTful Services. The XML overload associated with SOAP services might get your phone and your network into trouble
  • The return data can be either JSON or XML. For example, in Blackberry applications i prefer XML because the support included in the SDK.
  • There are three kinds of mobile applications: Web applications (build with HTML/Javascript and accessed throw a Browser), Native applications (installed in the device and coded in Java/Objective-C or another language) and Hybrid applications (installed in the device but coded in HTML/Javascript and can access some features of the OS). Your URL-Loading type sounds like an Hybrid approach (not quite sure about that), so you can use PhoneGap to build that type of applications.
  • Hybrid and Web applications uses the capabilities of the phone browser to manage HTML/JavaScript. Now the devices come with very powefull WebKIt-based Browsers, so the single page pattern would work with no problem. Although, it's kind of a wear approach to mobile application design.
  • I don't see the need of a local database in your app, you can simply handle all the data in the server and access it through RESTful Services on the phone.


I am developing an mobile application which can be run on mobile devices (with OS like Android, iOS, WP7...). This application will get data from online database then store them to local database in device and I can do CRUD with data

Nice!!!

Which technology should I use to create webservice? (RESTful/SOAP...?)

I Will go For REST services.

REST has advantages when:

  • You have a set of resources that you want to manipulate.
  • You want to support navigation between resources.
  • You need scalability.

SOAP has advantages when:

  • You want to publish a web service description (using WSDL). WSDL 2 can describe RESTful web service as well. WADL is an alternative to WSDL for RESTful web services.
  • You want to use security etc. that relies on the use of SOAP headers or some similar mechanism in which data is added and removed from a request.
  • You want better tooling support.
  • You want tested platform interoperability.

Which type of return data for easy to handle? (XML/JSON...?)

I personally go for XMLIts not a criteria of which is easy to handle.Its about performance in Mobile applications.JSON is generally smaller than a XML document and there for faster to 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 sync between local database and database on host?

Create a service which contains a timer and runs in background.Call the REST service at intervals to get the latest values. But Since this is a polling kind of thing,then it is not efficient and has less performance. Other Approach will be use of PUSH notifications.As soon as there is any change at the server side, send a push notification to the client(mobile) and hence perform the local database operations.

iOS, Android, WP7... accept for loading external URL in applications?

I didn't understand this point.What you want actually?

Should I use single page application technology?

Single page technology is very good.But it will depend on your business.If it is possible then use it.Else create different HTML pages.

I'll make an application using cross-platform framework and it will work with local database. I just handle syncing between local database and host database. Issue: which is the best database and best framework to do this?

Choosing of the database will depend upon choosing of the cross platform mobile framework.Phonegap is exactly what you need. And the database will be sqlite. Phonegap provide API's for storage,so you can easily access the database of the different mobile platform.