1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    2
    Vote Rating
    0
    alfred13 is on a distinguished road

      0  

    Default Unanswered: Database with Sencha

    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.

    Thanks,

    Alfred.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    There is a community SqlLite proxy that will read a sqlite database file. For databases like MySQL you will need a server side script to connect to the database, javascript cannot.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    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 services@sencha.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.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    2
    Vote Rating
    0
    alfred13 is on a distinguished road

      0  

    Default


    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?

  4. #4
    Touch Premium Member
    Join Date
    Aug 2011
    Location
    Arkansas
    Posts
    18
    Vote Rating
    0
    Digitalis is on a distinguished road

      0  

    Default


    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.

Thread Participants: 2

Tags for this Thread