Backbone 1.1.0 Released, Includes Potential Incompatibility with 1.0
What’s new in 1.1.0
The recent update was released on October 10th and it did not include any new features. Instead this update focused on what Backbone.js creator Jeremy Ashkenas described as “6 months worth of internal streamlining.” Still, outside of the underlying code improvements, Backbone.js 1.1.0 did include some API changes, detailed in the change log, such as:
- The return values of a Backbone Collection's set, add, remove and reset methods now return the changed model or list of models;
- Backbone Views no longer automatically attach options passed to the constructor as this.options.
- All "invalid" events now pass consistent arguments which are: the model in question; the error object; and options.
- The id of your model can no longer be changed during parse, but idAttribute should be used instead.
The remainder of the changes were described as “tweaks, optimizations and bugfixes to Backbone 1.0 features including URL overrides, mutation of options, bulk ordering, trailing slashes, edge-case listener leaks, nested model parsing” and more.
While the majority of the response to the release up to this point has been positive, there were some negative reactions. Based on responses on Twitter, some users appear to have been caught off guard by incompatibilities in a minor version release with the major 1.0 release that have been caused by some of the API changes detailed above. As Chris Wren asked:
“so Backbone doesn't follow semantic versioning? I thought breaking changes would mean a 2.0 release.”
“Oof, Backbone.js 1.1.0 makes some very core changes to View construction for option parsing. Massive incompatibility change. Don't get why.”
Obviously, it is assumed that the majority of users will be performing testing prior to making the upgrade to 1.1.0 but it is important to keep the nature of these changes in mind so as to be aware of potential incompatibilities.
Juergen Hoeller,Stéphane Nicoll Dec 18, 2014
Helen Walton Dec 17, 2014