O'Reilly logo

Developing Backbone.js Applications by Adnan Osmani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Conclusions

I hope that you’ve found this introduction to Backbone.js of value. What you’ve hopefully learned is that while building a JavaScript-heavy application using nothing more than a DOM manipulation library (such as jQuery) is certainly a possible feat, it is difficult to build anything nontrivial without any formal structure in place. Your nested pile of jQuery callbacks and DOM elements is unlikely to scale and can be very difficult to maintain as your application grows.

The beauty of Backbone.js is its simplicity. It’s very small given the functionality and flexibility it provides, which is evident if you begin to study the Backbone.js source. In the words of Jeremy Ashkenas: “The essential premise at the heart of Backbone has always been to try and discover the minimal set of data-structuring (Models and Collections) and user interface (Views and URLs) primitives that are useful when building web applications with JavaScript.” It just helps you improve the structure of your applications, helping you better separate concerns. There isn’t anything more to it than that.

Backbone offers models with key/value bindings and events, collections with an API of rich enumerable methods, declarative views with event handling, and a simple way to connect an existing API to your client-side application over a RESTful JSON interface. Use it, and you can abstract away data into sane models and your DOM manipulation into views, binding them together using nothing more than ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required