1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    2
    Vote Rating
    0
    jay252 is on a distinguished road

      0  

    Default Unanswered: Synchronising multiple data stores with a single request

    Unanswered: Synchronising multiple data stores with a single request


    I would like to send records from 2 related stores to the server with a single request. The reason being is that I want the records to be created as part of the same transaction on the server, as well as reduce the number of requests needed as I could see that a single action on the client my affect many stores in the future. I understand that models on the client can have associations, does this in any way facilitate my requirements? I also understand that a model or store has its own proxy and it doesin't seem like there is a way to create a third proxy that is consious of more than model/store at the same time.


    For example I might have a customer model and a order model. When a new customer places an order I want only one request going to the server containing the customer and order details. Tomorrow this request may contain a customer, order, order items, item configuration, payment details, shipping details and any number of other objects.


    Anyone have any experience with something like this or any thoughts on how to facilitate using the data store/model pattern in Sencha Touch?
    Last edited by jay252; 6 Nov 2012 at 7:03 AM. Reason: formatting

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3357
    Vote Rating
    751
    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


    I would almost think that it's going to take too much time for you and may be over your head to start hacking at the framework to get this working. Instead, I would just use Ext.Ajax and then update the stores in the response.
    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
    Nov 2010
    Posts
    2
    Vote Rating
    0
    jay252 is on a distinguished road

      0  

    Default


    Thanks Mitchell, I'm on board with your thought to use Ext.Ajax and manually update the stores once I receive my response.

    I think I will have the problem that the records I add or update in the store manually will be marked as dirty. I don't see how I can mark them as being clean since the setDirty method does not take a parameter. Would I need to remove all my proxies if I wanted to proceed with the manual synchronisation? Having the ability to mark a record as clean would help in this case.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar