Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
greenpoise
Posts: 17
Registered: ‎03-05-2012
My Device: Playbook
My Carrier: Koodo

XML or SQLite

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

Please use plain text.
New Developer
georgemck
Posts: 34
Registered: ‎12-28-2010
My Device: Red Z10, DevAlpha C, Bold 9900, PlayBook
My Carrier: Sprint, AT&T

Re: XML or SQLite

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: 

  http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/creating-or-opening-sqlite-db-in...

Onward to BBJam Asia 2013!
twitter/github: @georgemck http://www.bbdevla.com
Please use plain text.
Developer
kamal_nigam
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: XML or SQLite

I will suggest sqlite.

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: XML or SQLite

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.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Contributor
greenpoise
Posts: 17
Registered: ‎03-05-2012
My Device: Playbook
My Carrier: Koodo

Re: XML or SQLite

Thanks for this. Totally what I needed to get started, I hope so!
Please use plain text.
Contributor
greenpoise
Posts: 17
Registered: ‎03-05-2012
My Device: Playbook
My Carrier: Koodo

Re: XML or SQLite

Thanks!..so, JSON is the keyword in all this. I will look into it
Please use plain text.