[Dojo-interest] Looking for best datastore . . .

Peter Svensson psvensson at gmail.com
Fri Jul 24 01:48:43 EDT 2009


A good thing to note if you switch between them is thatm ItemFileReadStore
(and relatives) assume that the metadata is part of the data, lke;
{
  identifier: 'id',
  label: 'name,
  items: [ .. lots of json objects..]
}

Whereas JsonRestStore expect an array (empty, if need be) with objects in
response from the server;

[
  lots of json objects
]

Also, if you set up the JsonRestStore first, you will see how it assembles
its urls to the server, and go from there. It's fairly simple.
See http://docs.dojocampus.org/dojox/data/JsonRestStore for more info,
especially "How to implement a server".

Cheers,
PS

On Fri, Jul 24, 2009 at 12:26 AM, Cedric Hurst <cedric.hurst at gmail.com>wrote:

> Hi DHall,
>
> Have you looked at the JsonRestStore?  That might be a little easier to
> implement per your requirements.
>
> On 7/23/09 6:21 PM, DHall wrote:
> > Ok, I have a situation where a user can have a list of events open in a
> grid,
> > and can use an async request to create a new event/modify an existing
> event
> > in another panel (or, other users can create new events in their
> session).
> >
> > After the creation/modification, a notification eventually makes its way
> to
> > all open sessions/browsers. This notification includes the event ids of
> one
> > or more events created or modified recently. After receiving this
> > information, the datastore needs to request either a new list of events
> > (clunky) or just the identified events and then the grid needs to update
> > itself (preferred).
> >
> > What is the datastore which will best fulfill my needs here? I had it
> > "working" with ItemFileReadStore (closing the store and then causing the
> > grid to do something that re-fetches) but that seems not to be the most
> > elegant solution. I've been looking at ItemFileWriteStore and
> > QueryReadStore/QueryWriteStore but I'm starting to get lost in the
> options.
> > I don't necessarily need the full power of the Query Stores here (my
> event
> > numbers probably aren't ever going to be greater than 100 at a time, and
> > probably less), but if I can hack on them to do what I need to do, then
> > that's what needs be done. I just really need to know which one is the
> best
> > one to investigate in-depth under these circumstances. My data is coming
> in
> > json format.
> >
> > Thanks.
> >
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20090724/b04ac966/attachment.htm 


More information about the Dojo-interest mailing list