[dojo-contributors] Q about dojo.data update notification

Jared Jurkiewicz jared.jurkiewicz at gmail.com
Thu Aug 9 12:18:42 EDT 2007

Notification API is complete.  I don't know why Bill thinks it is
half-complete.   It's documented in dojo/data/api/Notification, as well as
out on the Dojotoolkit book:

It doesn't use topics.  There was a large amount of discussion on this and
it was agreed with Alex to keep it super simple (decided months ago).  There
are functions on the store you can connect to, to get events on changes.
This is no more work than asking a store for a topic, then listening to a
topic in the amount of code it would take (It's probably less).

And remember, not all stores implement every 'API' set.  Some stores may not
choose to implement Notification, just like some stores may not choose to
implement write.

-- Jared

On 8/9/07, Tom Trenka <ttrenka at gmail.com> wrote:
> Hey guys,
> I was just talking with Bill and I'm wondering what the current plan is
> for a dojo.data.store to notify anything consuming it that updates have
> been made?  It seems to me that the ideal situation would be to use topics,
> something on the order of (assuming multiple dijits are using the same store
> for data):
> 1.  new [dijit]: if gets data from a store, ask the store what the update
> topic to subscribe to is.
> 2.  dijit subscribes to said topic.
> 3.  all data changes are made to the underlying store as opposed to any
> kind of internal rep used by a dijit
> 4.  when changes are pushed into a store, the store publishes the topic
> message
> 5.  dijits built to re-render/update representation when subscriptions get
> the message.
> Bill mentioned that there's some kind of notification API in the works (or
> half done), but wasn't sure if this is the way it worked--hence the
> question.  I did something very similar to this with collections.Store/FilteringTable, and (aside from some bugs with updates as opposed to
> inserts) it worked very well (it used connect instead of topics, but
> otherwise that was the structure).
> Am I off with this, and if so would someone mind explaining either how it
> actually works (or what the game plan is)?
> trt
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-contributors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20070809/cc3c4fb2/attachment.htm 

More information about the dojo-contributors mailing list