View Full Version : store vs model proxy

23 Apr 2012, 7:19 AM
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!


1 May 2012, 6:35 AM
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.

8 May 2012, 10:47 AM
Thanks for the response! I have been able to play around some more and get better understanding of how the components fit together.