Backbone.js takes on a 1.0 milestone
After 888 days, Backbone.js has moved from its initial release to version 1.0. The 1.0 release was announced by Jeremy Ashkenas, also creator of CoffeeScript, as the "oft-promised" version 1.0 of the Model/View/Presenter JavaScript framework. Over the last year, developers have added smart updating for collections, mirrorable listenTo for Events, support for HTTP PATCH requests, and new data inspection functions. Backbone.js has been widely refactored, streamlined, optimised and literately documented.
Backbone.js provides JavaScript web applications with models, collections and views, which can be connected to existing RESTful JSON APIs. The models can be bound with key-values and custom events, collections have a wide range enumerable functions, and the views use declarative event handing.
Developers can represent their data as models which are saved to the server; when a UI action causes a model's attributes to change, it fires a change event that notifies the views that that model has changed, allowing them to re-render. Web applications that use BackBone.js include Airbnb, Diaspora, DocumentCloud, FourSquare, Hulu and NewsBlur. The developer of NewsBlur has published a presentation, based on his own experience, of how code can be migrated to Backbone.js.
Version 1.0's changes from the last release include a renaming of Collection's update
to set
to keep it in parallel with the model.set()
function, pre-decoded URL parameters for route handlers, the addition of a listenToOnce
listener, a new findWhere
method for collections, and the addition to Backbone Models of the keys
, values
, pairs
, invert
, pick
and omit
Underscore.js methods. Support for function literals has also been added to the Router and new models can now be passed url
and urlRoot
.
Ashkenas says that beyond version 1.0, the plan for Backbone.js is to keep refining it in a quest to "discover the minimal set of data-structuring and user interface primitives that are useful when building web applications with JavaScript". Backbone.js will retain its minimalist outlook going forward and Ashkenas says he is "looking forward to being surprised by more great apps" being built with it.
Backbone.js's MIT-licensed source code, documentation and many other resources can all be found on backbonejs.org.
(djwm)