08-22-2012 03:42 PM
I have a database ready. Is in SQLite. Now, if this database is going to be hosted somewhere, how can I pull the data from the playbook app I want to build? Most of the examples (jquery and XML fetch) are treated as if the data was local. Or, can I just upload the db as part of the project?? if its retrieved as XML, same question, how can it be remotely fetched?? I feel that having the data as SQLite means, easier way to update the data. Thanks
08-23-2012 12:57 AM
SQLite is an embedded database. It's really useful for offline access to your information. XML can do the same thing but is cumbersome and a bit slow.
For data that is not local, mobile apps should employ AJAX style (preferably with JSON) access to remote data stores. These generally should be secured with some kind of password you create; Oauth is popular for doing this.
Using SQLite and JSON-RPC, you can update the local data with remote data.
Consult this thread which has sample code:
08-23-2012 06:00 AM
I will suggest sqlite.
08-23-2012 01:29 PM
You need to build a server component/API in PHP, Ruby, etc. on your hosting platform which will serve the data stored in your database (SQLite) to your PlayBook app via JSON.
You can retrieve all the data the first time the app is loaded and store it locally on the PB or you could just query the server from time to time to only retrieve what's necessary.
If you want to include data with the app, I'd suggest converting it to JSON and to load it at app launch.