extjs4 - Which is the right place to apply proxy, is it in store or model? -
im new extjs, right place apply proxy, store or model? difference on them, better place gain more advantage?
proxy can attached either store or model. proxies can configured readers , writers decode , encode communications server.
what different in adding model or store?
store: configured our store use ajax proxy, telling url load data , reader used decode data. in case our server returning json, we've set json reader read response. here store support addition feature such filter,sorting , grouping can in mode class.
model: model set of fields , data. 4 principal parts of model fields, proxies, associations , validations. clear apart proxies support associations , validations. main benefit can load , save model data without creating store.
as whole can based on requirement decide 1 use. prefer store avail many feature rather model
.
Comments
Post a Comment