开发者

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

I'm learning Dojo 1.4. And I have difficulties wit开发者_StackOverflow社区h 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.


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


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).


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜