-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Need
Decouple DataSource from Widgets: We want the DataSource to be a self-sustained encapsulated module. Maybe even a separate OS component.
Deliverables (specs in this case)
- An API for primitive subscribing to a DataSource channel
- DataSource is the only element bound to a channel directly (so we have only one callback for channel)
- When a primitive (
Object {}subclass) subscribes to a DS channel, its reference is put into a global mapping within the DS, and not bound directly to the Backbone collection/model. When the DS receives an event for a channel, it traverses the global mapping of subscribers->channels, and dynamically establish which methods of which widget to call. This has a lot of advantages- GC is improved crazily! Only the DS is tied directly to a collection/model, the widgets just need to be removed from the DS global mapping.
- Having a DS global mapping makes debugging widget channels a dream, we can see them in plain text
- Widgets can change their get_items methods on the fly, we won't need fat arrows, post-initialize states or the backbone_events mambojambo; this isn't a real need, but it sure helps keeping this simple and transparent
Solution
Prerequisites
- [required dependency for identifying the problem, scope and then solution for this issue]
TODO
- [logical step in completing this story]
Files
- [path to a file involved in this story]
Notes
- [peculiar aspect relevant this story]
#ETA [0-2]p
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels