Results 1 to 3 of 3

Thread: store vs model proxy

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    6

    Default store vs model proxy

    Morning all,

    Have a quick question regarding when to use a store proxy vs a model proxy.

    I have an application that needs CRUD + listing functionality on a database table, and I am currently using a store proxy to retrieve the list and push it into a grid (works great). However, as I am looking further into the framework, it appears that only the model allows (in the "api" config) specification of CRUD actions / URLs.

    Could someone verify, discredit or otherwise enlighten on the following understanding?

    1) List actions should occur over the Store proxy (given that a Store is a collection / list of models)
    2) CRUD actions should happen over the Model proxy (given that they occur on individual records)

    Thanks so much!

    Sincerely,
    Brian

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    Using a store, the store will try to get the proxy config on itself. If one does not exists, it tries to get the proxy on the model. If that doesn't exist then it will use the default memory proxy. The only thing that matters is if you want to load the model by itself, then you have to have a proxy on the model.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    6

    Default

    Thanks for the response! I have been able to play around some more and get better understanding of how the components fit together.

    Sincerely,
    Brian

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •