4 ms·
The post is a little dense, I'll try to summarize: it's basically Backbone split into NPM modules so you can pick & choose. For instance, you want Backbone's co
by pfraze 12y ago
The post is a little dense, I'll try to summarize: it's basically Backbone split into NPM modules so you can pick & choose. For instance, you want Backbone's collections, but don't want the whole Backbone library, so you `npm install ampersand-collection`. They've setup a registry of recommended modules [1] and you compile with browserify.
Good for folks that are used to the node modules philosophy - Seems like a logical extension of the browserify effort (bringing Backbone into the frontend modules system). I dig it.
1. http://tools.ampersandjs.com/ http://tools.ampersandjs.com/
- philip_roberts 12y agoThat's true, although many of the core backbone components have been significantly modified/basically completely rewritten, keeping a fair amount of similarity with the backbone APIs but extending them too, for example: * Views have declarative data bindings for updating your html with model data automatically; out of the box, sensible render and remove methods just work; collection rendering is easy. * Models have explicitly declared properties and types, as well as evented + cached derived/computed properties. You can access model properties without .get('name') and .set('name', value) and events and things just work.
- __david__ 12y ago> You can access model properties without .get('name') and .set('name', value) and events and things just work. [when IE >= 9] Honestly though I'm excited by getters and setters. I always disliked calling them explicitly in Backbone—it feels like a hack. On the other hand, there's something nice to be said about explicit setters (you might not expect events to fire when it doesn't look like a function call). Still, I'd rather have real looking code than a bunch of xxx.set('propA', yyy.get('propB')) nonsense.
- latentflip 12y agoYup, we are basically targeting ie9 as a minimum, though some pieces will be okay in lesser browsers. Obviously that will mean some people can't use it, but hey, trade offs right :)