SlideShare a Scribd company logo
03 Backbone
Framework Analysis
Public Code Repository




                                                               by
                                          Sergey N. Bolshchikov
                                           http://bolshchikov.net
                         sergey.bolshchikov@new-proimage.com
                                           New ProImage, 2012
Outline
  I.   Introduction

 II.   Dependencies

III.   Components
       a. Model
       b. Collection
       c. View

IV.    Utilities
       a. Router
       b. History

V.     Conclusion
Shortly: 5 things
Backbone.js gives structure to web
applications by providing models with
key-value binding and custom events,
collections with a rich API of
enumerable functions, views with
declarative     event    handling,    and
connects it all to your existing API over
a RESTful JSON interface.
Shortly: 1
Backbone.js gives structure to web
applications by providing models with
key-value binding and custom events,
collections with a rich API of
enumerable functions, views with
declarative     event    handling,    and
connects it all to your existing API over
a RESTful JSON interface.
Shortly: 2
Backbone.js gives structure to web
applications by providing models with
key-value binding and custom events,
collections with a rich API of
enumerable functions, views with
declarative     event    handling,    and
connects it all to your existing API over
a RESTful JSON interface.
Shortly: 3
Backbone.js gives structure to web
applications by providing models with
key-value binding and custom events,
collections with a rich API of
enumerable functions, views with
declarative     event    handling,    and
connects it all to your existing API over
a RESTful JSON interface.
Shortly: 4
Backbone.js gives structure to web
applications by providing models with
key-value binding and custom events,
collections with a rich API of
enumerable functions, views with
declarative    event     handling,   and
connects it all to your existing API over
a RESTful JSON interface.
Shortly: 5
Backbone.js gives structure to web
applications by providing models with
key-value binding and custom events,
collections with a rich API of
enumerable        functions,views    with
declarative     event    handling,    and
connects it all to your existing API over
a RESTful JSON interface.
Dependencies


               Backbone

  Underscore    json2.js   [jQuery]
Backbone Components
Model
Backbone model contains interactive data. It possess different useful properties
and methods:

●   id - modelID
●   idAttribute - databaseID
●   get(attrName) - returns attribute value
●   set(attrName, attrValue) - sets the value for the named attribute
●   clear() - removes all model attributes
●   toJSON() - return a copy of the model's attributes for JSON stringification
●   url - relative URL where the model's resource would be located on the
    server
●   fetch() - gets the latest version of the model from the server
●   save() - saves the model to the DB
●   validate() - checks the given data before set() and save()

P.S. Almost never is predefined
Model
var GreetingModel = Backbone.Model.extend({
    // defaults specify what attributes the model should
    // posses upon creation
    defaults: {
        text: 'hello world'
    }
});

var TodoModel = Backbone.Model.extend({
    defaults: {
        id: 1000,
        done: false,
        name: 'default task',
        deadline: new Date()
    }
});
Collection
Collections are ordered sets of models. It can be fetched from the server. Any
event that is triggered on a model in a collection will also be triggered on the
collection directly, for convenience.
 ● add()
 ● remove()

Comfortable backbone built data structure over models: array and stack.
 ● push()
 ● pop()
 ● unshift()
 ● shift()

Some handy methods:
 ● sort()
 ● where() - filters collection by given attribute
 ● fetch()
Collection
// Definitions
// Todo Model
var TodoModel = Backbone.Model.extend({
    defaults: {
        id: 1000,
        done: false,
        name: 'default task',
        deadline: new Date()
    }
});

// Todo Collection: ordered list of Todo models
var TodoCollection = Backbone.Collection.extend({
    model: TodoModel
});
View
The most disputable component in the Backbone framework.
Camp I:                 "It's NOT a controller"
Camp II:                "It's a controller"
Backbone Authors:       "If it helps any, in Backbone, the View class can also be
thought of as a kind of controller, dispatching events that originate from the UI,
with the HTML template serving as the true view."

What it does in life:
● renders the template and generates html
● handles user-generated events

Attributes and Methods partially of view and controller:
 ● tagName - html tag for the generated view
 ● $el - cached jQuery DOM selector
 ● events: {} - hash of event
 ● render() - rendering method
View
var GreetingView = Backbone.View.extend({
    // every view must have a specified render method
    // otherwise nothing would be seen
    render: function() {
        $('p').html(this.model.get('text'));
        return this;
    }
});

var greet = new GreetingModel();

new GreetingView({model: greet}).render()​




                                             Hello world Example
View
var RecordView = Backbone.View.extend({
    tagName: 'tr',
    events: {
        'click': 'performed'
    },
    initialize : function() {
        this.model.bind('change', this.render, this);
    },
    render: function() {
        var generatedHtml = _.template(this.template, {
            id: this.model.get('id'),
            done: this.model.get('done'),
            name: this.model.get('name'),
            deadline: this.model.get('deadline' )
        });
        $(this.el).html(generatedHtml );
        return this;
    },
    performed: function() {
        this.model.set('done', true);
    }
});
                                                          Todo Example
View
var RecordView = Backbone.View.extend( {
    tagName: 'tr',
    events: {
        'click': 'performed'
    },
    initialize: function() {
        this.model.bind('change', this.render, this);
    },
    render: function() {
        var generatedHtml = _.template(this.template, {
            id: this.model.get('id'),
            done: this.model.get('done'),
            name: this.model.get('name'),
            deadline: this.model.get('deadline')
        });
        $(this.el).html(generatedHtml);
        return this;
    },
    performed: function() {
        this.model.set('done', true);
    }
});
View
var RecordView = Backbone.View.extend( {
    tagName: 'tr',
    events: {
        'click': 'performed'
    },
    initialize: function() {
        this.model.bind('change', this.render, this);
    },
    render: function() {
        var generatedHtml = _.template(this.template, {
            id: this.model.get('id'),
            done: this.model.get('done'),
            name: this.model.get('name'),
            deadline: this.model.get('deadline')
        });
        $(this.el).html(generatedHtml);
        return this;
    },
    performed: function() {
        this.model.set('done', true);
    }
});
View
var RecordView = Backbone.View.extend( {
    tagName: 'tr',
    events: {
        'click': 'performed'
    },
    initialize: function() {
        this.model.bind('change', this.render, this);
    },
    render: function() {
        var generatedHtml = _.template(this.template, {
            id: this.model.get('id'),
            done: this.model.get('done'),
            name: this.model.get('name'),
            deadline: this.model.get('deadline')
        });
        $(this.el).html(generatedHtml);
        return this;
    },
    performed: function() {
        this.model.set('done', true);
    }
});
View
var RecordView = Backbone.View.extend( {
    tagName: 'tr',
    events: {
        'click': 'performed'
    },
    initialize : function() {
        this.model.bind('change', this.render, this);
    },
    render: function() {
        var generatedHtml = _.template(this.template, {
            id: this.model.get('id'),
            done: this.model.get('done'),
            name: this.model.get('name'),
            deadline: this.model.get('deadline')
        });
        $(this.el).html(generatedHtml);
        return this;
    },
    performed: function() {
        this.model.set('done', true);
    }
});
View
var RecordView = Backbone.View.extend( {
    tagName: 'tr',
    events: {
        'click': 'performed'
    },
    initialize: function() {
        this.model.bind('change', this.render, this);
    },
    render: function() {
        var generatedHtml = _.template(this.template, {
            id: this.model.get('id'),
            done: this.model.get('done'),
            name: this.model.get('name'),
            deadline: this.model.get('deadline' )
        });
        $(this.el).html(generatedHtml );
        return this;
    },
    performed: function() {
        this.model.set('done', true);
    }
});
Template
Underscore templating engine by default. It's possible to connect any other.
<tr>
    <td><%=   id %></td>
    <td><%=   done %></td>
    <td><%=   name %></td>
    <td><%=   deadline %></td>
</tr>​


●   Mixes template with the data from a model
●   Generates html
●   Append is with DOM element
render: function() {
        var generatedHtml = _.template(this.template, {
            id: this.model.get('id'),
            done: this.model.get('done'),
            name: this.model.get('name'),
            deadline: this.model.get('deadline')
        });
        $(this.el).html(generatedHtml);
        return this;
    },                                                         Todo Example
Event
Events is a module that can be mixed in to any object, giving the object the
ability to bind and trigger custom named events.


var object = {};

_.extend(object, Backbone.Events);

object.on("alert", function(msg) {
  alert("Triggered " + msg);
});

object.trigger("alert", "an event");​

                                                                 Event Example
Router & History
Backbone.Router provides methods for routing client-side pages, and
connecting them to actions and events.


window.Router = Backbone.Router.extend({
     routes: {
         '': 'tree',
         'folder/:name' : 'list'
     },
     initialize : function() {
         this.headerView = new HeaderView ();
         $('.header').html(this.headerView .render().el);
         ...
     },
     tree: function() {
         ...
     },
     list: function(name) {
         ...
     }
});​
Performance
●   All modern browsers support, IE 8+

●   Framework size: Backbone + Underscore = 89KB

●   Application size: 330KB
Conclusion
●   Lightweight

●   Great momentum: many project, community support

●   Good documentation

●   Binds to any JS library

More Related Content

PDF
Backbone.js — Introduction to client-side JavaScript MVC
PPTX
AngularJS $Provide Service
PPTX
AngularJS Compile Process
PDF
AngularJS Framework
PDF
Min-Maxing Software Costs
PPT
Backbone.js
PPTX
AngularJS Services
PDF
AngularJs
Backbone.js — Introduction to client-side JavaScript MVC
AngularJS $Provide Service
AngularJS Compile Process
AngularJS Framework
Min-Maxing Software Costs
Backbone.js
AngularJS Services
AngularJs

What's hot (20)

PPTX
AngularJS: what is underneath the hood
PDF
Writing Maintainable JavaScript
PPTX
Optimizing Angular Performance in Enterprise Single Page Apps
TXT
Data20161007
PDF
Client Side MVC & Angular
PDF
Before there was Hoop Dreams, there was McDonald's: Strange and Beautiful
PDF
Delivering a Responsive UI
PDF
Beyond the DOM: Sane Structure for JS Apps
PPTX
AngulrJS Overview
PDF
Hidden rocks in Oracle ADF
PDF
Decoupling with Design Patterns and Symfony2 DIC
PDF
前端MVC 豆瓣说
PDF
Data binding w Androidzie
PDF
Angular js is the future. maybe. @ ConFoo 2014 in Montreal (CA)
PDF
Mad Max is back, plus the rest of our new reviews and notable screenings
PDF
Databinding and Performance-Tuning in Angular 2
PDF
Tinkerbelles return home from their Guinness world-record attempt on Sunday
PDF
Cyclejs introduction
PPTX
Why Sifu
AngularJS: what is underneath the hood
Writing Maintainable JavaScript
Optimizing Angular Performance in Enterprise Single Page Apps
Data20161007
Client Side MVC & Angular
Before there was Hoop Dreams, there was McDonald's: Strange and Beautiful
Delivering a Responsive UI
Beyond the DOM: Sane Structure for JS Apps
AngulrJS Overview
Hidden rocks in Oracle ADF
Decoupling with Design Patterns and Symfony2 DIC
前端MVC 豆瓣说
Data binding w Androidzie
Angular js is the future. maybe. @ ConFoo 2014 in Montreal (CA)
Mad Max is back, plus the rest of our new reviews and notable screenings
Databinding and Performance-Tuning in Angular 2
Tinkerbelles return home from their Guinness world-record attempt on Sunday
Cyclejs introduction
Why Sifu
Ad

Viewers also liked (7)

PPTX
Introduction To Backbone JS
PPT
Backbone.js
KEY
Backbone.js
PDF
Structuring web applications with Backbone.js
PPTX
Writing HTML5 Web Apps using Backbone.js and GAE
PDF
Introduction to Backbone - Workshop
PPTX
Introduction to Backbone.js
Introduction To Backbone JS
Backbone.js
Backbone.js
Structuring web applications with Backbone.js
Writing HTML5 Web Apps using Backbone.js and GAE
Introduction to Backbone - Workshop
Introduction to Backbone.js
Ad

Similar to Backbone Basics with Examples (20)

PDF
Clean Javascript
PDF
Backbone js
PPT
Backbone js
PDF
Viking academy backbone.js
PDF
Understanding backbonejs
PDF
Backbone.js
PDF
Using Backbone.js with Drupal 7 and 8
PPT
Backbone js-slides
PDF
Patterns Are Good For Managers
PDF
JSLab. Алексей Волков. "React на практике"
PPT
Backbone js
PDF
MVC on the Server and on the Client: How to Integrate Spring MVC and Backbone...
PDF
Introduction to Spring MVC
PDF
Javascript Frameworks for Joomla
PDF
JavaScript Refactoring
PDF
Django Class-based views (Slovenian)
PDF
Introduction to angular js
KEY
MVC on the server and on the client
PPTX
Javascript first-class citizenery
PPTX
Taming that client side mess with Backbone.js
Clean Javascript
Backbone js
Backbone js
Viking academy backbone.js
Understanding backbonejs
Backbone.js
Using Backbone.js with Drupal 7 and 8
Backbone js-slides
Patterns Are Good For Managers
JSLab. Алексей Волков. "React на практике"
Backbone js
MVC on the Server and on the Client: How to Integrate Spring MVC and Backbone...
Introduction to Spring MVC
Javascript Frameworks for Joomla
JavaScript Refactoring
Django Class-based views (Slovenian)
Introduction to angular js
MVC on the server and on the client
Javascript first-class citizenery
Taming that client side mess with Backbone.js

More from Sergey Bolshchikov (14)

PDF
Onboarding for Software Engineers Done Right
PDF
Pragmatic React Workshop
PDF
Microservices on the client side
PDF
ES2015 Quiz
PDF
Talking code: How To
PPTX
Values & Culture of Continuous Deliver
PDF
Protractor: Tips & Tricks
PDF
Continuous Delivery for Front-End Engineers
PDF
Зачем нужен EmberJS, если мне хвататет jQuery
PDF
Ember Reusable Components and Widgets
PDF
Front End Development: The Important Parts
PDF
Web Projects: From Theory To Practice
PDF
AngularJS Basics with Example
PDF
JS Single-Page Web App Essentials
Onboarding for Software Engineers Done Right
Pragmatic React Workshop
Microservices on the client side
ES2015 Quiz
Talking code: How To
Values & Culture of Continuous Deliver
Protractor: Tips & Tricks
Continuous Delivery for Front-End Engineers
Зачем нужен EmberJS, если мне хвататет jQuery
Ember Reusable Components and Widgets
Front End Development: The Important Parts
Web Projects: From Theory To Practice
AngularJS Basics with Example
JS Single-Page Web App Essentials

Recently uploaded (20)

PDF
COST SHEET- Tender and Quotation unit 2.pdf
DOCX
unit 1 COST ACCOUNTING AND COST SHEET
PDF
Power and position in leadershipDOC-20250808-WA0011..pdf
PPTX
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
PPTX
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
PPTX
Amazon (Business Studies) management studies
PDF
Deliverable file - Regulatory guideline analysis.pdf
PDF
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
PDF
Reconciliation AND MEMORANDUM RECONCILATION
PDF
Nidhal Samdaie CV - International Business Consultant
PPTX
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
PDF
Chapter 5_Foreign Exchange Market in .pdf
PPTX
New Microsoft PowerPoint Presentation - Copy.pptx
PPTX
Belch_12e_PPT_Ch18_Accessible_university.pptx
PPTX
Principles of Marketing, Industrial, Consumers,
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PPTX
ICG2025_ICG 6th steering committee 30-8-24.pptx
PDF
Cours de Système d'information about ERP.pdf
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
PDF
NewBase 12 August 2025 Energy News issue - 1812 by Khaled Al Awadi_compresse...
COST SHEET- Tender and Quotation unit 2.pdf
unit 1 COST ACCOUNTING AND COST SHEET
Power and position in leadershipDOC-20250808-WA0011..pdf
job Avenue by vinith.pptxvnbvnvnvbnvbnbmnbmbh
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
Amazon (Business Studies) management studies
Deliverable file - Regulatory guideline analysis.pdf
Solara Labs: Empowering Health through Innovative Nutraceutical Solutions
Reconciliation AND MEMORANDUM RECONCILATION
Nidhal Samdaie CV - International Business Consultant
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
Chapter 5_Foreign Exchange Market in .pdf
New Microsoft PowerPoint Presentation - Copy.pptx
Belch_12e_PPT_Ch18_Accessible_university.pptx
Principles of Marketing, Industrial, Consumers,
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
ICG2025_ICG 6th steering committee 30-8-24.pptx
Cours de Système d'information about ERP.pdf
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
NewBase 12 August 2025 Energy News issue - 1812 by Khaled Al Awadi_compresse...

Backbone Basics with Examples

  • 1. 03 Backbone Framework Analysis Public Code Repository by Sergey N. Bolshchikov http://bolshchikov.net [email protected] New ProImage, 2012
  • 2. Outline I. Introduction II. Dependencies III. Components a. Model b. Collection c. View IV. Utilities a. Router b. History V. Conclusion
  • 3. Shortly: 5 things Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • 4. Shortly: 1 Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • 5. Shortly: 2 Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • 6. Shortly: 3 Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • 7. Shortly: 4 Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • 8. Shortly: 5 Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions,views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • 9. Dependencies Backbone Underscore json2.js [jQuery]
  • 11. Model Backbone model contains interactive data. It possess different useful properties and methods: ● id - modelID ● idAttribute - databaseID ● get(attrName) - returns attribute value ● set(attrName, attrValue) - sets the value for the named attribute ● clear() - removes all model attributes ● toJSON() - return a copy of the model's attributes for JSON stringification ● url - relative URL where the model's resource would be located on the server ● fetch() - gets the latest version of the model from the server ● save() - saves the model to the DB ● validate() - checks the given data before set() and save() P.S. Almost never is predefined
  • 12. Model var GreetingModel = Backbone.Model.extend({ // defaults specify what attributes the model should // posses upon creation defaults: { text: 'hello world' } }); var TodoModel = Backbone.Model.extend({ defaults: { id: 1000, done: false, name: 'default task', deadline: new Date() } });
  • 13. Collection Collections are ordered sets of models. It can be fetched from the server. Any event that is triggered on a model in a collection will also be triggered on the collection directly, for convenience. ● add() ● remove() Comfortable backbone built data structure over models: array and stack. ● push() ● pop() ● unshift() ● shift() Some handy methods: ● sort() ● where() - filters collection by given attribute ● fetch()
  • 14. Collection // Definitions // Todo Model var TodoModel = Backbone.Model.extend({ defaults: { id: 1000, done: false, name: 'default task', deadline: new Date() } }); // Todo Collection: ordered list of Todo models var TodoCollection = Backbone.Collection.extend({ model: TodoModel });
  • 15. View The most disputable component in the Backbone framework. Camp I: "It's NOT a controller" Camp II: "It's a controller" Backbone Authors: "If it helps any, in Backbone, the View class can also be thought of as a kind of controller, dispatching events that originate from the UI, with the HTML template serving as the true view." What it does in life: ● renders the template and generates html ● handles user-generated events Attributes and Methods partially of view and controller: ● tagName - html tag for the generated view ● $el - cached jQuery DOM selector ● events: {} - hash of event ● render() - rendering method
  • 16. View var GreetingView = Backbone.View.extend({ // every view must have a specified render method // otherwise nothing would be seen render: function() { $('p').html(this.model.get('text')); return this; } }); var greet = new GreetingModel(); new GreetingView({model: greet}).render()​ Hello world Example
  • 17. View var RecordView = Backbone.View.extend({ tagName: 'tr', events: { 'click': 'performed' }, initialize : function() { this.model.bind('change', this.render, this); }, render: function() { var generatedHtml = _.template(this.template, { id: this.model.get('id'), done: this.model.get('done'), name: this.model.get('name'), deadline: this.model.get('deadline' ) }); $(this.el).html(generatedHtml ); return this; }, performed: function() { this.model.set('done', true); } }); Todo Example
  • 18. View var RecordView = Backbone.View.extend( { tagName: 'tr', events: { 'click': 'performed' }, initialize: function() { this.model.bind('change', this.render, this); }, render: function() { var generatedHtml = _.template(this.template, { id: this.model.get('id'), done: this.model.get('done'), name: this.model.get('name'), deadline: this.model.get('deadline') }); $(this.el).html(generatedHtml); return this; }, performed: function() { this.model.set('done', true); } });
  • 19. View var RecordView = Backbone.View.extend( { tagName: 'tr', events: { 'click': 'performed' }, initialize: function() { this.model.bind('change', this.render, this); }, render: function() { var generatedHtml = _.template(this.template, { id: this.model.get('id'), done: this.model.get('done'), name: this.model.get('name'), deadline: this.model.get('deadline') }); $(this.el).html(generatedHtml); return this; }, performed: function() { this.model.set('done', true); } });
  • 20. View var RecordView = Backbone.View.extend( { tagName: 'tr', events: { 'click': 'performed' }, initialize: function() { this.model.bind('change', this.render, this); }, render: function() { var generatedHtml = _.template(this.template, { id: this.model.get('id'), done: this.model.get('done'), name: this.model.get('name'), deadline: this.model.get('deadline') }); $(this.el).html(generatedHtml); return this; }, performed: function() { this.model.set('done', true); } });
  • 21. View var RecordView = Backbone.View.extend( { tagName: 'tr', events: { 'click': 'performed' }, initialize : function() { this.model.bind('change', this.render, this); }, render: function() { var generatedHtml = _.template(this.template, { id: this.model.get('id'), done: this.model.get('done'), name: this.model.get('name'), deadline: this.model.get('deadline') }); $(this.el).html(generatedHtml); return this; }, performed: function() { this.model.set('done', true); } });
  • 22. View var RecordView = Backbone.View.extend( { tagName: 'tr', events: { 'click': 'performed' }, initialize: function() { this.model.bind('change', this.render, this); }, render: function() { var generatedHtml = _.template(this.template, { id: this.model.get('id'), done: this.model.get('done'), name: this.model.get('name'), deadline: this.model.get('deadline' ) }); $(this.el).html(generatedHtml ); return this; }, performed: function() { this.model.set('done', true); } });
  • 23. Template Underscore templating engine by default. It's possible to connect any other. <tr> <td><%= id %></td> <td><%= done %></td> <td><%= name %></td> <td><%= deadline %></td> </tr>​ ● Mixes template with the data from a model ● Generates html ● Append is with DOM element render: function() { var generatedHtml = _.template(this.template, { id: this.model.get('id'), done: this.model.get('done'), name: this.model.get('name'), deadline: this.model.get('deadline') }); $(this.el).html(generatedHtml); return this; }, Todo Example
  • 24. Event Events is a module that can be mixed in to any object, giving the object the ability to bind and trigger custom named events. var object = {}; _.extend(object, Backbone.Events); object.on("alert", function(msg) { alert("Triggered " + msg); }); object.trigger("alert", "an event");​ Event Example
  • 25. Router & History Backbone.Router provides methods for routing client-side pages, and connecting them to actions and events. window.Router = Backbone.Router.extend({ routes: { '': 'tree', 'folder/:name' : 'list' }, initialize : function() { this.headerView = new HeaderView (); $('.header').html(this.headerView .render().el); ... }, tree: function() { ... }, list: function(name) { ... } });​
  • 26. Performance ● All modern browsers support, IE 8+ ● Framework size: Backbone + Underscore = 89KB ● Application size: 330KB
  • 27. Conclusion ● Lightweight ● Great momentum: many project, community support ● Good documentation ● Binds to any JS library