yobo
v0.5.0
Published
Yolean Backbone
Downloads
688
Readme
Yolean Backbone
To make our Backbone based code more maintainable we need:
- A
.mixin
as complement to.extend
. Subclassing works for specialization but not for composition. - A separation between the jQuery and browser dependent View/Router/sync stuff and the data structures Model/Controller. The latter is used server side.
- We don't need a default
.sync
at all. - Ways to use the same backbone instance across modules, or alternatively override the default _isModel in the upcoming Backbone release. Basically anything with a
.attributes
can be considered a model and shouldn't be wrapped at.add
. - Complement Collection
.filter
and.where
with.subset
that returns a connected Collection
This implies that the lib must extend default functionality of backbone. That goes for the re-export in bullet (4). It should not however modify any existing functionality, but it can export mixins that do so.