Re:Backbone 0.9.0 released
by niels on Tuesday January 31, 2012 @04:01AM
(#3532446)
Awesome that events hash now takes a function. I've needed that for a while, and should really get in the habit of submitting patches instead of waiting for others to do the work.
- collection.fetch() now correctly calls model.parse() (I patched Backbone.Collection.prototype.parse(), but their fix is nicer)
- 'add' and 'remove' events now include the index (I had to work it out from scratch with sortedIndex())
- event 'bind' is now called 'on' (sensible as _.bind is already used for partial application)
- confusion over this.el and $()-wrapping is now cleared up
- events hash can now include functions (I like to avoid reflection where possible - even in JS)
- collection.create() now fires 'add' before the server replies (this makes writing a responsive UI much easier)
The last one is quite a significant change! Luckily my app is easy to fix, as I've only spent a few days on it.