Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Backbone 1.1.0 Released, Includes Potential Incompatibility with 1.0

Backbone 1.1.0 Released, Includes Potential Incompatibility with 1.0

This item in japanese

Lire ce contenu en français

A new update to Backbone.js, one of the most widely used front-end architectural frameworks in the JavaScript community, was released the past week. Although it is not a significant version number update, reports from some users indicate that some of changes may cause incompatibility in applications designed to work with version 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.

Incompatibility Reports

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.”

Other comments centered on a similar criticism. The core incompatibility complaint seems to center around the changes to Backbone Views as illustrated by Christian Hammond’s tweet:

“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.

Rate this Article