This is the second tutorial in the Backbone.js Series. The first tutorial, Building Backbone.js Applications from a Drupal Perspective - Level 1, should probably be watched first.
Level 2: Getting started with building a Backbone.js App
Welcome to Level 2, Backbone Views are the new Drupal Blocks. In an application with many Routes, each Route may have have one or more components on that page. In Drupal, we’ve typically assigned blocks to specific routes and regions. For on any given Route you probably have the Content Block assigned to your theme’s main region and the Login Block assigned to the left sidebar. In this lesson we will find that Backbone Views can be used very much like Drupal Blocks to display components across a site.
Here’s our to do list.
- Convert our static “about text” into a Backbone View.
- Create a Contact View and pass data to that View using a Backbone Model.
- When data changes, rerender Views without page refresh.