SlideShare a Scribd company logo
Architecting Web Applications
Build Modular Web Applications Using Backbone.js and RequireJS
Naresh Bhatia
CTO, Sapient Global Markets
Co-lead Visualization Practice
Experience
Trading and Risk Management applications using
JavaScript, Java and .NET
Founder Archfirst (http://archfirst.org)
A place for software developers to learn and compare
technologies through real world examples
A case study in visualization
A technologistโ€™s side-project that was
functional, but lacked finesse.
Before
In Between
After
What does it take to build such
applications?
JavaScript Space used to be
The Wild West
Sliding banners
5000 lines of procedural code in a single file
Complex DOM spaghetti
The landscape is changing now
Recent Advances in JavaScript
โ€ข AJAX enables changing of content without refreshing the entire page
โ€ข Browsers implement better and faster JavaScript engines
โ€ข Rise of smart web โ€œapplicationsโ€ (vs. static web sites)
โ€“ Gmail
โ€“ Facebook
โ€“ Twitter
โ€ข People start talking about โ€œarchitectureโ€ of their JavaScript applications
โ€“ Object-orientation
โ€“ Design patterns
โ€“ MVC
โ€“ In-application messaging
โ€“ Modularity
JavaScript is a respectable
platform today
Serious JavaScript developers do worry
about architecture these days!
Model-View-Controller (MVC)
A pattern that encourages separation of concerns and code reuse
MVC Philosophy
Separate application state from
its presentation
Separate models from their views
Get the truth out of the DOM
MVC Philosophy โ€“ Get the truth out of the DOM
Doesnโ€™t matter what flavor of MVC you are using
MVC, MVP, MVVM, MV*, MVWhatever
Models
Views
Introducing Backbone โ€“ A Lightweight MV* Framework
โ€ข Organize your interface into logical views backed by models
โ€“ Each view responsible for one DOM element
โ€“ Each view can be updated independently when the model changes
โ€“ Reduces DOM traversal, increasing performance
โ€ข See here for an example (slide 8)
โ€ข No need to dig into a JSON object, look up an element in the DOM, and
update the HTML by hand
โ€“ Bind your view's render function to the model's "change" event
โ€“ Now every view that displays this model is updated immediately on a change
Backbone MVC Example
http://archfirst.googlecode.com/svn/trunk/html/examples/backbone-mvc-example/index.html
Tile
color: F89F1B
Backbone Models
โ€ข Models are Backbone objects that contain โ€œattributesโ€
โ€ข Whenever an attributeโ€™s value changes, the model triggers a change event
// Define a model
var Tile = Backbone.Model.extend({
});
// Create an instance of the model
var tile = new Tile( );
// Set an attribute to fire the change event
tile.set({color: 0xF89F1B});
โ€œchangeโ€
eventTile
color: F89F1B
Updating views from change events
tile
tileRectView
color: F89F1B
el:
model:
// 1. Create an instance of the model
var tile = new Tile( );
// 2. Create a view, attach it to the model & DOM
var tileRectView =
new TileRectView ({el: '#tileโ€˜, model: tile});
// 3. (constructor) Bind view to model change event
this.model.on('change', this.render);
// 4. Change a model attribute
tile.set({color: 0xF89F1B});
// 5. Model fires a โ€˜changeโ€™ event
// 6. View catches the event & calls render( )
this.$el.css(
'background-color', '#' +
color2hex(this.model.get('color')));
1
2
render( )
4
โ€˜changeโ€™
event
6
DOM
<div id="tile" ></div>
5
3
Collections
brokerageAccounts
accountTableView
el:
collection:
this.$el.empty();
this.collection.each(function(account, i) {
var view = new AccountView({model: account});
this.$el.append(view.render().el);
}, this);
DOM
<table id="accounts_table">
<thead>...</thead>
<tbody></tbody>
</table>
initialize( )
render( )
this.collection.bind('reset', this.render);
brokerageAccount
brokerageAccount
brokerageAccount
Composing an interface from multiple views โ€“ View Hierarchy
AccountsPage
AccountsTab
UserPageHeaderWidget
AccountTableWidget AccountChartWidget
AccountView
FooterWidget
AccountView
AccountView
AccountView
Inserting pages and widgets dynamically
index.html
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
<div id="container">
<!-- Pages go here -->
</div>
</body>
</html>
A typical page
AccountsPage.js
BaseView.extend({
postRender: function() {
this.addChildren([
{
viewClass: UserPageHeaderWidget,
parentElement: this.$el
},
{
viewClass: AccountsTab,
parentElement: this.$el
},
{
viewClass: FooterWidget,
parentElement: this.$el
}
]);
}
}
A typical widget
UserPageHeaderWidget.js
BaseView.extend({
tagName: 'header',
className: 'user-page-header',
template: {
name: 'UserPageHeaderTemplate',
source: UserPageHeaderTemplate
}
});
UserPageHeaderTemplate.html
<div class="user-info">
<span>{{firstName}} {{lastName}}</span>
<img src="img/person-icon-small.png" alt="seperator" />
<a class="js-signOut" href="#">Sign Out</a>
</div>
<h1 class="ir">Bullsfirst</h1>
Classic Server-Side Layered Architecture
User Interface
Layer
Accepts user commands and presents
information back to the user
Application
Layer
Manages transactions, translates DTOs,
coordinates application activities, creates and
accesses domain objects
Domain
Layer
Contains the state and behavior of the domain
Infrastructure
Layer
Supports all other layers, includes repositories,
adapters, frameworks etc.
Bullsfirst Client-Side Layered ArchitectureFrameworkPresentationLayerDomain
In-Application Messaging
โ€ข Interactions between table and chart
โ€ข If theses widgets interacted directly, the coupling would be too tight
โ€ข Use a message bus (a.k.a. pub/sub) to decouple the components
Account :
mouseover
JavaScript Modularity
A pattern that supports large scale application development
How much of your application can
you hold in your head at once?
Bullsfirst is about 2000 lines of JS
Have you ever been in
Dependency Hell?
<script src="js/form2js.js"></script>
<script src="js/toObject.js"></script>
<script src="js/base64_encode.js"></script>
<script src="js/utf8_encode.js"></script>
<script src="js/format.js"></script>
<script src="js/treeTable.js"></script>
<script src="js/jalerts.js"></script>
AMD and RequireJS to the rescue
AMD: Asynchronous Module Definition
(an API for defining and loading JS modules)
RequireJS: A popular implementation of AMD
Modules allow you to break large
applications into bite-size chunks
Code reuse & separation of concerns
Complements the MVC pattern
Structure of a Modular App
src
|-- js
| |-- app
| | |-- domain
| | | |-- Repository.js
| | | |-- BrokerageAccount.js
| | | `-- ...
| | |-- pages
| | | |-- home
| | | |-- accounts
| | | `-- ...
| | `-- widgets
| | `-- account-table
| | `-- account-chart
| | `-- ...
| |-- framework
| | |-- Baseview.js
| | |-- Router.js
| | `-- ...
| `-- vendor
| |-- backbone.js
| |-- jquery.js
| `-- ...
|-- sass
|-- img
`-- index.html
60+ JavaScript files
2000 lines of code
But much easier to find things!
JavaScript and
templates (markup)
JavaScript and
templates (markup)
Defining a Module
RequireJS loads all code relative to a baseUrl
(set to the same directory as the script used in a data-main)
// app/widgets/login/LoginWidget
// Defines a widget called LoginWidget
define(
[],
function() {
return BaseView.extend({
...
});
}
);
Using a Module
Defining dependency on a module makes sure that the
module is pulled in before the dependent code.
// app/pages/home/HomePage
// Defines the home page that uses the LoginWidget
define(
['app/widgets/login/LoginWidget'],
function(LoginWidget) {
return BaseView.extend({
postRender: function() {
this.addChild({
id: 'LoginWidget',
viewClass: LoginWidget,
parentElement: this.$el
});
}
...
});
}
);
Moving templates into text modules
<td class="name">
{{name}}
</td>
<td class="market-value">
{{formatMoney marketValue}}
</td>
<td class="cash">
{{formatMoney cashPosition}}
</td>
...
AccountTemplate.html
Using templates defined in text modules
define(
['text!app/widgets/account-table/AccountTemplate.html'],
function(AccountTemplate) {
return BaseView.extend({
template: {
name: 'AccountTemplate',
source: AccountTemplate
},
...
});
}
);
AccountView.js
Optimizing for Production โ€“ The Build System
โ€ข A web application consisting of hundreds of JavaScript files could have
severe performance implications in a production environment
โ€ข RequireJS comes with an optimizer that walks the dependency tree and
concatenates all the required JavaScript files into one
โ€ข The Bullsfirst build system runs the RequireJS optimizer plus other
optimizations such as yuicompressor and uglifyjs to reduce the download
size of the application
โ€“ The build system is based on Grunt.js, a task-based command line build tool for
JavaScript projects
โ€“ It cuts down application load time to approximately 2 seconds on a 3 Mbps network
Summary
Summary
โ€ข Use the MVC pattern to enforce separation of concerns
โ€ข Compose your application using smaller Reusable Components
โ€ข Create a Domain Layer as a central place for views to access information
โ€ข Use In-Application Messaging to decouple application components
โ€ข Use Modules to break large applications into bite-size chunks
A strong architecture is key to building engaging web applications
References
References
โ€ข Backbone.js โ€“ https://github.com/documentcloud/backbone
โ€ข RequireJS โ€“ https://github.com/jrburke/requirejs
โ€ข Bullsfirst is an open-source project under http://archfirst.org
โ€“ Sharing best practices with the developer community
โ€“ Live demo at http://archfirst.org/apps/bullsfirst-jquery-backbone
โ€“ Source repository: https://github.com/archfirst/bullsfirst-jquery-backbone
โ€“ Discussion/feedback at http://archfirst.org/forums/general-discussion
43
Ad

More Related Content

What's hot (20)

React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
Learntek1
ย 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop
Ahmed rebai
ย 
React-js
React-jsReact-js
React-js
Avi Kedar
ย 
React js basics
React js basicsReact js basics
React js basics
Maulik Shah
ย 
React js, node js &amp; angular js which one is the best for web development
React js, node js &amp; angular js  which one is the best for web development React js, node js &amp; angular js  which one is the best for web development
React js, node js &amp; angular js which one is the best for web development
Concetto Labs
ย 
React js for beginners
React js for beginnersReact js for beginners
React js for beginners
Alessandro Valenti
ย 
Internal workshop react-js-mruiz
Internal workshop react-js-mruizInternal workshop react-js-mruiz
Internal workshop react-js-mruiz
Miguel Ruiz Rodriguez
ย 
Reactjs
Reactjs Reactjs
Reactjs
Neha Sharma
ย 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
Bethmi Gunasekara
ย 
Intro to React
Intro to ReactIntro to React
Intro to React
Justin Reock
ย 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !
Ritesh Kumar
ย 
Say Hello to React day2 presentation
Say Hello to React   day2 presentationSay Hello to React   day2 presentation
Say Hello to React day2 presentation
Smile Gupta
ย 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
Aeshan Wijetunge
ย 
Developing dynamic ui using react
Developing dynamic ui using reactDeveloping dynamic ui using react
Developing dynamic ui using react
sushmita bhor
ย 
Muhammad azamuddin introduction-to-reactjs
Muhammad azamuddin   introduction-to-reactjsMuhammad azamuddin   introduction-to-reactjs
Muhammad azamuddin introduction-to-reactjs
PHP Indonesia
ย 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
Knoldus Inc.
ย 
Say hello to react js - Day 1
Say hello to react js   - Day 1Say hello to react js   - Day 1
Say hello to react js - Day 1
Smile Gupta
ย 
Angular vs. React
Angular vs. ReactAngular vs. React
Angular vs. React
OPITZ CONSULTING Deutschland
ย 
Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM
Tamir Azrab
ย 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
kiranabburi
ย 
React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
Learntek1
ย 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop
Ahmed rebai
ย 
React-js
React-jsReact-js
React-js
Avi Kedar
ย 
React js basics
React js basicsReact js basics
React js basics
Maulik Shah
ย 
React js, node js &amp; angular js which one is the best for web development
React js, node js &amp; angular js  which one is the best for web development React js, node js &amp; angular js  which one is the best for web development
React js, node js &amp; angular js which one is the best for web development
Concetto Labs
ย 
React js for beginners
React js for beginnersReact js for beginners
React js for beginners
Alessandro Valenti
ย 
Internal workshop react-js-mruiz
Internal workshop react-js-mruizInternal workshop react-js-mruiz
Internal workshop react-js-mruiz
Miguel Ruiz Rodriguez
ย 
Reactjs
Reactjs Reactjs
Reactjs
Neha Sharma
ย 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
Bethmi Gunasekara
ย 
Intro to React
Intro to ReactIntro to React
Intro to React
Justin Reock
ย 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !
Ritesh Kumar
ย 
Say Hello to React day2 presentation
Say Hello to React   day2 presentationSay Hello to React   day2 presentation
Say Hello to React day2 presentation
Smile Gupta
ย 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
Aeshan Wijetunge
ย 
Developing dynamic ui using react
Developing dynamic ui using reactDeveloping dynamic ui using react
Developing dynamic ui using react
sushmita bhor
ย 
Muhammad azamuddin introduction-to-reactjs
Muhammad azamuddin   introduction-to-reactjsMuhammad azamuddin   introduction-to-reactjs
Muhammad azamuddin introduction-to-reactjs
PHP Indonesia
ย 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
Knoldus Inc.
ย 
Say hello to react js - Day 1
Say hello to react js   - Day 1Say hello to react js   - Day 1
Say hello to react js - Day 1
Smile Gupta
ย 
Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM
Tamir Azrab
ย 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
kiranabburi
ย 

Viewers also liked (8)

Erlang factory layered architecture - final
Erlang factory   layered architecture - finalErlang factory   layered architecture - final
Erlang factory layered architecture - final
Dennis Docter
ย 
Layered Architecture 03 Format
Layered Architecture 03 FormatLayered Architecture 03 Format
Layered Architecture 03 Format
anishgoel
ย 
Sa 008 patterns
Sa 008 patternsSa 008 patterns
Sa 008 patterns
Frank Gielen
ย 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
Srini Penchikala
ย 
Soa Overview
Soa OverviewSoa Overview
Soa Overview
Terry Cho
ย 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns
Assaf Gannon
ย 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Svetlin Nakov
ย 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
Riccardo Cardin
ย 
Erlang factory layered architecture - final
Erlang factory   layered architecture - finalErlang factory   layered architecture - final
Erlang factory layered architecture - final
Dennis Docter
ย 
Layered Architecture 03 Format
Layered Architecture 03 FormatLayered Architecture 03 Format
Layered Architecture 03 Format
anishgoel
ย 
Sa 008 patterns
Sa 008 patternsSa 008 patterns
Sa 008 patterns
Frank Gielen
ย 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
Srini Penchikala
ย 
Soa Overview
Soa OverviewSoa Overview
Soa Overview
Terry Cho
ย 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns
Assaf Gannon
ย 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Svetlin Nakov
ย 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
Riccardo Cardin
ย 
Ad

Similar to Rp 6 session 2 naresh bhatia (20)

MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
ย 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
ย 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
Daniel Bryant
ย 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
Milan Korsos
ย 
Refactor Large apps with Backbone
Refactor Large apps with BackboneRefactor Large apps with Backbone
Refactor Large apps with Backbone
devObjective
ย 
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsRefactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js
Stacy London
ย 
Refactor Large applications with Backbone
Refactor Large applications with BackboneRefactor Large applications with Backbone
Refactor Large applications with Backbone
ColdFusionConference
ย 
MVC
MVCMVC
MVC
akshin
ย 
Jinal desai .net
Jinal desai .netJinal desai .net
Jinal desai .net
rohitkumar1987in
ย 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
Soรณs Gรกbor
ย 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
jonknapp
ย 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
Acquisio
ย 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
ย 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
ย 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
ย 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
Mark Gu
ย 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
Rasel Khan
ย 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
ย 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
Mohammed Arif
ย 
Intro lift
Intro liftIntro lift
Intro lift
Knoldus Inc.
ย 
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
ย 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
ย 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
Daniel Bryant
ย 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
Milan Korsos
ย 
Refactor Large apps with Backbone
Refactor Large apps with BackboneRefactor Large apps with Backbone
Refactor Large apps with Backbone
devObjective
ย 
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsRefactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js
Stacy London
ย 
Refactor Large applications with Backbone
Refactor Large applications with BackboneRefactor Large applications with Backbone
Refactor Large applications with Backbone
ColdFusionConference
ย 
MVC
MVCMVC
MVC
akshin
ย 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
Soรณs Gรกbor
ย 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
jonknapp
ย 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
Acquisio
ย 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
ย 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
ย 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
ย 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
Mark Gu
ย 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
Rasel Khan
ย 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
ย 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
Mohammed Arif
ย 
Intro lift
Intro liftIntro lift
Intro lift
Knoldus Inc.
ย 
Ad

More from sapientindia (8)

Redefining Perspectives - June 2015
Redefining Perspectives - June 2015Redefining Perspectives - June 2015
Redefining Perspectives - June 2015
sapientindia
ย 
Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2
sapientindia
ย 
Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1
sapientindia
ย 
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
sapientindia
ย 
Redefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath FordeRedefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath Forde
sapientindia
ย 
Risk managementusinghadoop
Risk managementusinghadoopRisk managementusinghadoop
Risk managementusinghadoop
sapientindia
ย 
Analyticsand bigdata
Analyticsand bigdataAnalyticsand bigdata
Analyticsand bigdata
sapientindia
ย 
Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1
sapientindia
ย 
Redefining Perspectives - June 2015
Redefining Perspectives - June 2015Redefining Perspectives - June 2015
Redefining Perspectives - June 2015
sapientindia
ย 
Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2
sapientindia
ย 
Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1
sapientindia
ย 
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
sapientindia
ย 
Redefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath FordeRedefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath Forde
sapientindia
ย 
Risk managementusinghadoop
Risk managementusinghadoopRisk managementusinghadoop
Risk managementusinghadoop
sapientindia
ย 
Analyticsand bigdata
Analyticsand bigdataAnalyticsand bigdata
Analyticsand bigdata
sapientindia
ย 
Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1
sapientindia
ย 

Recently uploaded (20)

Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
ย 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
ย 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
ย 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
ย 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
ย 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
ย 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
ย 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
ย 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
ย 

Rp 6 session 2 naresh bhatia

  • 1. Architecting Web Applications Build Modular Web Applications Using Backbone.js and RequireJS
  • 2. Naresh Bhatia CTO, Sapient Global Markets Co-lead Visualization Practice Experience Trading and Risk Management applications using JavaScript, Java and .NET Founder Archfirst (http://archfirst.org) A place for software developers to learn and compare technologies through real world examples
  • 3. A case study in visualization
  • 4. A technologistโ€™s side-project that was functional, but lacked finesse.
  • 8. What does it take to build such applications?
  • 9. JavaScript Space used to be The Wild West Sliding banners 5000 lines of procedural code in a single file Complex DOM spaghetti
  • 10. The landscape is changing now
  • 11. Recent Advances in JavaScript โ€ข AJAX enables changing of content without refreshing the entire page โ€ข Browsers implement better and faster JavaScript engines โ€ข Rise of smart web โ€œapplicationsโ€ (vs. static web sites) โ€“ Gmail โ€“ Facebook โ€“ Twitter โ€ข People start talking about โ€œarchitectureโ€ of their JavaScript applications โ€“ Object-orientation โ€“ Design patterns โ€“ MVC โ€“ In-application messaging โ€“ Modularity
  • 12. JavaScript is a respectable platform today Serious JavaScript developers do worry about architecture these days!
  • 13. Model-View-Controller (MVC) A pattern that encourages separation of concerns and code reuse
  • 15. Separate application state from its presentation Separate models from their views Get the truth out of the DOM
  • 16. MVC Philosophy โ€“ Get the truth out of the DOM Doesnโ€™t matter what flavor of MVC you are using MVC, MVP, MVVM, MV*, MVWhatever Models Views
  • 17. Introducing Backbone โ€“ A Lightweight MV* Framework โ€ข Organize your interface into logical views backed by models โ€“ Each view responsible for one DOM element โ€“ Each view can be updated independently when the model changes โ€“ Reduces DOM traversal, increasing performance โ€ข See here for an example (slide 8) โ€ข No need to dig into a JSON object, look up an element in the DOM, and update the HTML by hand โ€“ Bind your view's render function to the model's "change" event โ€“ Now every view that displays this model is updated immediately on a change
  • 19. Backbone Models โ€ข Models are Backbone objects that contain โ€œattributesโ€ โ€ข Whenever an attributeโ€™s value changes, the model triggers a change event // Define a model var Tile = Backbone.Model.extend({ }); // Create an instance of the model var tile = new Tile( ); // Set an attribute to fire the change event tile.set({color: 0xF89F1B}); โ€œchangeโ€ eventTile color: F89F1B
  • 20. Updating views from change events tile tileRectView color: F89F1B el: model: // 1. Create an instance of the model var tile = new Tile( ); // 2. Create a view, attach it to the model & DOM var tileRectView = new TileRectView ({el: '#tileโ€˜, model: tile}); // 3. (constructor) Bind view to model change event this.model.on('change', this.render); // 4. Change a model attribute tile.set({color: 0xF89F1B}); // 5. Model fires a โ€˜changeโ€™ event // 6. View catches the event & calls render( ) this.$el.css( 'background-color', '#' + color2hex(this.model.get('color'))); 1 2 render( ) 4 โ€˜changeโ€™ event 6 DOM <div id="tile" ></div> 5 3
  • 21. Collections brokerageAccounts accountTableView el: collection: this.$el.empty(); this.collection.each(function(account, i) { var view = new AccountView({model: account}); this.$el.append(view.render().el); }, this); DOM <table id="accounts_table"> <thead>...</thead> <tbody></tbody> </table> initialize( ) render( ) this.collection.bind('reset', this.render); brokerageAccount brokerageAccount brokerageAccount
  • 22. Composing an interface from multiple views โ€“ View Hierarchy AccountsPage AccountsTab UserPageHeaderWidget AccountTableWidget AccountChartWidget AccountView FooterWidget AccountView AccountView AccountView
  • 23. Inserting pages and widgets dynamically index.html <!DOCTYPE html> <html> <head> ... </head> <body> <div id="container"> <!-- Pages go here --> </div> </body> </html>
  • 24. A typical page AccountsPage.js BaseView.extend({ postRender: function() { this.addChildren([ { viewClass: UserPageHeaderWidget, parentElement: this.$el }, { viewClass: AccountsTab, parentElement: this.$el }, { viewClass: FooterWidget, parentElement: this.$el } ]); } }
  • 25. A typical widget UserPageHeaderWidget.js BaseView.extend({ tagName: 'header', className: 'user-page-header', template: { name: 'UserPageHeaderTemplate', source: UserPageHeaderTemplate } }); UserPageHeaderTemplate.html <div class="user-info"> <span>{{firstName}} {{lastName}}</span> <img src="img/person-icon-small.png" alt="seperator" /> <a class="js-signOut" href="#">Sign Out</a> </div> <h1 class="ir">Bullsfirst</h1>
  • 26. Classic Server-Side Layered Architecture User Interface Layer Accepts user commands and presents information back to the user Application Layer Manages transactions, translates DTOs, coordinates application activities, creates and accesses domain objects Domain Layer Contains the state and behavior of the domain Infrastructure Layer Supports all other layers, includes repositories, adapters, frameworks etc.
  • 27. Bullsfirst Client-Side Layered ArchitectureFrameworkPresentationLayerDomain
  • 28. In-Application Messaging โ€ข Interactions between table and chart โ€ข If theses widgets interacted directly, the coupling would be too tight โ€ข Use a message bus (a.k.a. pub/sub) to decouple the components Account : mouseover
  • 29. JavaScript Modularity A pattern that supports large scale application development
  • 30. How much of your application can you hold in your head at once? Bullsfirst is about 2000 lines of JS
  • 31. Have you ever been in Dependency Hell? <script src="js/form2js.js"></script> <script src="js/toObject.js"></script> <script src="js/base64_encode.js"></script> <script src="js/utf8_encode.js"></script> <script src="js/format.js"></script> <script src="js/treeTable.js"></script> <script src="js/jalerts.js"></script>
  • 32. AMD and RequireJS to the rescue AMD: Asynchronous Module Definition (an API for defining and loading JS modules) RequireJS: A popular implementation of AMD
  • 33. Modules allow you to break large applications into bite-size chunks Code reuse & separation of concerns Complements the MVC pattern
  • 34. Structure of a Modular App src |-- js | |-- app | | |-- domain | | | |-- Repository.js | | | |-- BrokerageAccount.js | | | `-- ... | | |-- pages | | | |-- home | | | |-- accounts | | | `-- ... | | `-- widgets | | `-- account-table | | `-- account-chart | | `-- ... | |-- framework | | |-- Baseview.js | | |-- Router.js | | `-- ... | `-- vendor | |-- backbone.js | |-- jquery.js | `-- ... |-- sass |-- img `-- index.html 60+ JavaScript files 2000 lines of code But much easier to find things! JavaScript and templates (markup) JavaScript and templates (markup)
  • 35. Defining a Module RequireJS loads all code relative to a baseUrl (set to the same directory as the script used in a data-main) // app/widgets/login/LoginWidget // Defines a widget called LoginWidget define( [], function() { return BaseView.extend({ ... }); } );
  • 36. Using a Module Defining dependency on a module makes sure that the module is pulled in before the dependent code. // app/pages/home/HomePage // Defines the home page that uses the LoginWidget define( ['app/widgets/login/LoginWidget'], function(LoginWidget) { return BaseView.extend({ postRender: function() { this.addChild({ id: 'LoginWidget', viewClass: LoginWidget, parentElement: this.$el }); } ... }); } );
  • 37. Moving templates into text modules <td class="name"> {{name}} </td> <td class="market-value"> {{formatMoney marketValue}} </td> <td class="cash"> {{formatMoney cashPosition}} </td> ... AccountTemplate.html
  • 38. Using templates defined in text modules define( ['text!app/widgets/account-table/AccountTemplate.html'], function(AccountTemplate) { return BaseView.extend({ template: { name: 'AccountTemplate', source: AccountTemplate }, ... }); } ); AccountView.js
  • 39. Optimizing for Production โ€“ The Build System โ€ข A web application consisting of hundreds of JavaScript files could have severe performance implications in a production environment โ€ข RequireJS comes with an optimizer that walks the dependency tree and concatenates all the required JavaScript files into one โ€ข The Bullsfirst build system runs the RequireJS optimizer plus other optimizations such as yuicompressor and uglifyjs to reduce the download size of the application โ€“ The build system is based on Grunt.js, a task-based command line build tool for JavaScript projects โ€“ It cuts down application load time to approximately 2 seconds on a 3 Mbps network
  • 41. Summary โ€ข Use the MVC pattern to enforce separation of concerns โ€ข Compose your application using smaller Reusable Components โ€ข Create a Domain Layer as a central place for views to access information โ€ข Use In-Application Messaging to decouple application components โ€ข Use Modules to break large applications into bite-size chunks A strong architecture is key to building engaging web applications
  • 43. References โ€ข Backbone.js โ€“ https://github.com/documentcloud/backbone โ€ข RequireJS โ€“ https://github.com/jrburke/requirejs โ€ข Bullsfirst is an open-source project under http://archfirst.org โ€“ Sharing best practices with the developer community โ€“ Live demo at http://archfirst.org/apps/bullsfirst-jquery-backbone โ€“ Source repository: https://github.com/archfirst/bullsfirst-jquery-backbone โ€“ Discussion/feedback at http://archfirst.org/forums/general-discussion 43