22 Jan 2013 1:45 PM #1
Unanswered: How and Where to store data ?
I have following case to handle:
My application has around 5000 book titles. Now, I don't want application to ping server to get these books on his mobile. Application will need to access this data during run time. So should I
a) dump the data into sqlite at the time of installation of the application ? (First time run)
b) Fetch data from files only. ( I will be making sorting and querying operations over this data - may not be a good solution if I store the entire file in an array at once and process it further )
24 Jan 2013 6:15 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Sounds like sqlite may be bestMitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
24 Jan 2013 6:26 AM #3
Can I prestore data ?
thanks a lot for the reply.
Can I store pre-package the data at the time of deployment. Or should I prepare a dump sql file which I should insert at the time of install. Please enlighten me.
24 Jan 2013 4:57 PM #4
Depends on your use case.
If your users will not have access to the server at all, and the data is static, store it locally. If data is dynamic, retrive it on request from the server. If your customer use case is some combination of the two, or they do not always require up-to-date data, then implement as you see fit.
25 Jan 2013 12:38 AM #5
I guess you will need the sql only if you are updating the books.
If you are not updating the books keep them in a file or as a static and load the JSON string as data object.