[Dojo-interest] Global stores at app level

Tony Mobily merc at mobily1.com
Thu Apr 11 01:17:59 EDT 2013


Hi,

In my application, I have several stores that I define in a "stores" module.
So, the stores are "global" so to speak. Now... I am dealing with the issue
of having some stores with subURLs, which made everything "interesting":
what target URL shall I set for those stores? For example,
/bookings/44/perfomers  could be the URL for a store. So, really, it is
/bookings/:bookingId/performers.

I tried creating a global store  with target
`/bookings/:bookingId/performers`, and used a modified version of
JsonRest.js so that I would create a new store object using lang.delegate(
baseStoreObject ) (with the target "resolved" so that :bookingId becomes a
number). But... well, I am not being very successful here.

What's the consensus here in terms of creating application-wide stores? I
think having app-wide stores is important as it's possible to observe query
results everywhere in the application. But when a store has a sub-url,
what's the best practice here?

Merc. 



--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Global-stores-at-app-level-tp3995757.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.


More information about the Dojo-interest mailing list