Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    19
    Vote Rating
    0
    ikean is on a distinguished road

      0  

    Default Clarification: Remote Model, Local Store?

    Clarification: Remote Model, Local Store?


    I've been playing with (and enjoying) Sencha Touch, but now I'm moving into communicate with a server side of things.

    It looks awesomely supported so far, but I need a little clarification.

    Q: Models are for pulling data from a remote server, and Stores are for keeping an instance of that data cached locally?
    • Does the Store data persist? As in, does it save to the device?
    Q: Why do I sometimes see a proxy: on the Model and other times on the Store?
    • Can they both have a proxy? What kind of effect or functionality does this produce/provide?
    Q: To help me better wrap my mind around this local/remote difference, can someone provide a simple proof of concept code example showing this behavior:
    1. Create a "User" data. name, email, phone
    2. Save the User data:
      1. Update the data on the remote server
      2. Update update the data locally (on the device) as well
    3. Load the User data:
      1. If the data is present locally on the device, load it
      2. If the data isn't present locally on the device, pull it from the server and store it locally
    Is the remote/local discrepancy of this simple example something that can provide insight into the different roles that Models and Stores play in an app?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Vote Rating
    814
    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


    You can have a proxy on both the model and the store. If you are using the store and you have a proxy set on the model and not the store then the store can use the proxy from the model. The advantage of having it set on the model is you can load/save a single model without using a store.
    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.

Thread Participants: 1

Tags for this Thread