Tutorial :DOJO: what's the difference be design between JsonQueryRestStore and QueryReadStore



Question:

I'm learning Dojo 1.4. And I have difficulties with understanding all dojo's data stores. Particular I wonder what's the difference between JsonQueryRestStore and QueryReadStore ? JsonQueryRestStore has query facilities and Json support, ok. But QueryReadStore also expects Json in response (somebody knows where does the expected format documented btw?). Tecnically they both use Rest services.

Things goes more suble when look at ServiceStore and PersevereStore. They also use Json services.

Help me please to grasp the point in their design concepts.

P.S. Please don't tell "go and read the docs". Documentation is very brief and often unclear. Moreover there are many sources of docs (http://api.dojotoolkit.org/jsdoc, http://www.dojotoolkit.org/reference-guide, http://www.dojotoolkit.org/api/, http://dojocampus.org/). And breaking changes for major versions are undocumented (what's working in 1.3 doesn't work in 1.4, etc), that's because many samples (especially all of them at http://dojocampus.org) and articles are out of date.


Solution:1

As far as my understanding, JsonQueryRestStore as more querying capabilities, which are listed in JsonQuery.


Solution:2

A Dojo QueryReadStore is a read-only store. All you can do is fetch information from it, and the information you fetch is coded in JSON.

A Dojo JsonRestStore is a read-write store. It implements GET, PUT, POST and DELETE which allows you to fetch information from the store (GET), add information to the store (PUT), update entries in the store (POST) and delete entries in the store (DELETE).


Solution:3

QueryReadStore is not a RESTful store. Its just JSON over HTTP. QRS is readonly and AFAIK works better under IE.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »