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 6. Backbone Extensions

Backbone is flexible, simple, and powerful. However, you may find that the complexity of the application you are working on requires more than what it provides out of the box. There are certain concerns that it just doesn’t address directly, as one of its goals is to be minimalist.

Take, for example, views, which provide a default render method that does nothing and produces no real results when called, despite most implementations using it to generate the HTML that the view manages. Also, models and collections have no built-in way of handling nested hierarchies—if you require this functionality, you need to write it yourself or use a plug-in.

In these cases, there are many existing Backbone plug-ins that can provide advanced solutions for large-scale Backbone apps. You can find a fairly complete list of the available plug-ins and frameworks on the Backbone wiki. With these add-ons, there is enough for applications of most sizes to be completed successfully.

In this section of the book, we will look at two popular Backbone add-ons: MarionetteJS and Thorax.

MarionetteJS (Backbone.Marionette)

By Derick Bailey and Addy Osmani

As we’ve seen, Backbone provides a great set of building blocks for our JavaScript applications. It gives us the core constructs that we need to build small to midsize apps, organize jQuery DOM events, or create single-page apps that support mobile devices and large-scale enterprise needs. But Backbone is not a complete framework. It’s ...

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