O'Reilly logo

Backbone.js Essentials by Jeremy Walker

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 5. Adding and Modifying Elements with Views

In this chapter, we'll take a look at how to do the following:

  • Create new View classes and instances
  • Use Views to render DOM elements
  • Connect Views to Models and Collections
  • Respond to DOM events using Views
  • Decide the rendering style(s) that best fits your project

Views are the core of Backbone-powered sites

While data is certainly important in any application, you can't have an application without a user interface at all. On the web, this means that you have a combination of DOM elements (to display information to the user) and event handlers (to receive input from the user). In Backbone, both of these things are managed by Views; in fact, it's only fair to say that Views pretty much control all the ...

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