21 Sep 2012 7:21 AM #1
Unanswered: Database with Sencha
I'm new with Sencha and I try to work with a database that Sencha could be update with data in an application for iOS.
Does anyone do something like this? With Sqlite database or Mysql database?
I don't understand if "Store" can do that for me.
23 Sep 2012 4:12 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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 email@example.com
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.
27 Sep 2012 6:48 AM #3
Thanks for this indication.
Now, I want to prepopulate my database. My application must has data in offline mode for the first time launched. How can i do that?
I tried to give two proxies for one model (one in ajax with local json, an other one in localstore), but I think it can take only on proxy.
Is it possible de take data from local json or local database and add these datas in my database when the application is launched?
27 Sep 2012 4:42 PM #4
I have similar requirements for the app I'm working on now. I suggest ditching the built in stores. IMO they're just not flexible enough to support online/offline switching. I still use stores for UI databinding, but I don't use them for local persistence or syncing with a remote server.
Instead of using the built in stores I wrote a thin data layer using WebSQL, and hand rolled all of the ajax needed to sync back and forth. It's pretty simple and you'll know exactly what is happening when anything goes wrong, instead wasting time of trying to cajole the store classes into doing what you want.