Unanswered: Sencha Touch Local Storage
I am a newbie on Sencha Touch. Here is my case:
I have around a database base of cars ( cars, manufacturer, photos etc ) which I would like to display using Sencha Touch application. There are going to be around 3000 objects. This data will be displayed in a Sencha Touch Carousel. I do not want fetch from server during run time. Can you suggest me on how to store and access this database ? I will be making some queries as well ( for example - list car with manufacturer X, date < Y ). I was planning to store this entire data in JSON format in some file in the application which I could have accessed through LocalStorage but that won't give me flexibility of querying.
Thanks in advance for the help.
Mmmm.... 3000 objects is a tough one.
Theoretically, what you can do is pull in all the data into a store, and then filter that store (this would be the equivalent to querying).
However, I had a very similar database size for an app last year (I was storing every NFL player, around 2000 in total) and performance really struggled on phones, as they just didn't have enough memory.
The other challenge you might face is updating that data, which it would be best to have in a JSON file. If you're running a webapp best plan is just to have a CRON job on the server that overwrites the JSON file, if you're going native it gets trickier...
Thanks for the reply. Your answer was enlightening I am sent you my email address via PM.
What was the problem you faced while using SQLite ? Does Sencha Touch not support SQLite ?
Tags for this Thread