Dojo provides a common Store API for data store operations. rest.js provides two implementations of these APIs that use a rest client under the hood. Typical Dojo stores include an in memory MemoryStore
or the ever popular JsonRest
. The issue with JsonRest is fundamentally that it presumes the mechanics of the request and response. If your server doesn't fit the convention it expects, you're out of luck. rest.js doesn't presume to force a particular content type, or structure. Any client can be wrapped to provide the full power and flexibility of rest.js with the Dojo Store API.
rest/dojo/SimpleRestStore
(src)
An implementation of the Dojo Store API without a concrete dependency on Dojo.
The constructor accepts one additional argument, a rest.js client. The client is used for all requests and is commonly configured with the pathPrefix
interceptor for nested paths.
Please see the Dojo Store API docs for details.
rest/dojo/RestStore
(src)
Extends SimpleRestStore
providing enhanced support for queries via Dojo's QueryResults dojo/store/util/QueryResults
. This introduces a hard dependency on Dojo that many users may want to avoid unless they need the enhanced behavior, or already have Dojo loaded in their application.
rest/dojo/wire
(src)
Contains the functionality of rest/wire
adding an additional reference resolver for 'resource!' modeled after wire/dojo/store
. 'resource!' supports the same configuration properties as 'client!'.