SlideShare a Scribd company logo
BackboneJS + ReactJS
Library vs Framework ??
 A library performs specific, well-defined operations.
 A framework is a collection of patterns and libraries to help with
building an application.
 Backbone.js (Model/Controller) - Framework
 React.js (View) - Library
“Frameworks skip Somework”
BackboneJS
Frontend uber-light MVC framework,with RESTful
support & more flexible.
Pros
 can be easily integrated into an existing project & adding
structure to Javascript...
 My application is going to do a lot of heavy DOM
manipulations & handle large chunk of data.
Cons
 Learning curve not as simple as other MVC
 External dependencies like Jquery, Underscore.js
 Non RESTful API backend
 Nested backbone View difficult to maintain, every collection
changes re-render all the views.
Backbone Models
Model encapsulate business logic and data
var Todo = Backbone.Model.extend({
defaults: {
title: 'backbone_title',
},
initialize: function(){
console.log('This model has been initialized.');
},
setTitle: function(newTitle){
this.set({ title: newTitle });
}
});
var myTodo = new Todo();
myTodo.setTitle('Backbone Hello world.');
Backbone View
 Views are responsible for listening to DOM element's events & updating the
DOM elements.
 View templates -- underscore.js handlebar.js
var AppView = Backbone.View.extend({
// el - stands for element. Every view has a element associate in with HTML
content will be rendered.
el: '#container',
initialize: function(){
this.render();
},
render: function(){
this.$el.html("Hello World");
}
});
ReactJS
React is a UI library to facilitate the creation of
interactive, stateful & reusable UI components.
 Building large applications with data that changes over time.
 It's just a View of M'V'C framework.
 Virtual DOM (USP).
 React has only “Components” that will just re-render.
 Javascript + HTML = JSX
 JSX - Allows us to write HTML like syntax which gets
transformed to lightweight JavaScript objects.
 Render in Server via node.js
Components & LifeCycle
Component = view/HTML + controller/JS
React.createClass({ })
The way in which you create a new component.
State -- Internal data,can change
Prop -- External data,can't change
UpdateCycle Component LifeCycle
React.createClass()
componentWillUnmount()
getInitialState()
componentDidMount()
componentWillMount()
Render()
Render()
componentWillUpdate()
componentDidUpdate()
Virtual DOM
 when data has changed ??
 which DOM element(s) to be updated??
 Angular “Digest cycle” mechanism
 On every update in the State
 React's diffing algorithm DOM Structure
Patch
boolean shouldComponentUpdate()
Architecture Traditional MVC
 Difficult to organise the code
 Good to use Asynchronous
Module Definition (AMD)
like require.js,browserify,gulp
Flux Architecture
Dispatcher acts as traffic controller.
One-way data flow.
dispatcheraction store view
View
model
model
model
model
view
View
View
controller
Challenges
 Code maintenance (JS + HTML)
 No two way data-binding
 No separate Templates
 Converting JSX to JS (Babel)
 ReactJS Gotchas
 Re-initialise datatables
Alerts account landing page DEMO
Questions ??
Skanda Shastry
skanda.shastry02@gmail.com

More Related Content

PDF
Backbone to React. What it says about awesome UI Code.
PDF
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
PPTX
Intro to React
PPTX
Introduction to React JS
PPTX
React & Redux JS
ODP
Running ms sql stored procedures in mule
PDF
Javascript ui for rest services
PDF
Backbone to React. What it says about awesome UI Code.
Backbone.js with React Views - Server Rendering, Virtual DOM, and More!
Intro to React
Introduction to React JS
React & Redux JS
Running ms sql stored procedures in mule
Javascript ui for rest services

What's hot (20)

PPTX
Introduction to react js
ODP
BackboneJS and friends
PPTX
Backbone.js and friends
PPTX
Introduction to React JS for beginners
PDF
Backbone js
PPTX
[Final] ReactJS presentation
PDF
Backbone
PPTX
Vývojařská Plzeň - React
PPTX
Its time to React.js
PPTX
Planbox Backbone MVC
PPTX
The Benefits of Using React JS for Web Development!
PPTX
20180518 QNAP Seminar - Introduction to React Native
ODP
Javascript frameworks: Backbone.js
PPTX
Introduction to Backbone.js
PPT
Managing JavaScript Dependencies With RequireJS
PDF
Workshop 22: React-Redux Middleware
PDF
Angularjs architecture
PDF
React JS & Functional Programming Principles
PDF
Vue, vue router, vuex
PDF
React js
Introduction to react js
BackboneJS and friends
Backbone.js and friends
Introduction to React JS for beginners
Backbone js
[Final] ReactJS presentation
Backbone
Vývojařská Plzeň - React
Its time to React.js
Planbox Backbone MVC
The Benefits of Using React JS for Web Development!
20180518 QNAP Seminar - Introduction to React Native
Javascript frameworks: Backbone.js
Introduction to Backbone.js
Managing JavaScript Dependencies With RequireJS
Workshop 22: React-Redux Middleware
Angularjs architecture
React JS & Functional Programming Principles
Vue, vue router, vuex
React js
Ad

Viewers also liked (19)

PDF
Full Stack Toronto - the 3R Stack
PDF
The Future and Energy
PDF
React.js and Flux in details
PDF
Week11 1st draft
PDF
ติดตั้ง Postgres
PPTX
Primer t
PPTX
Project gt tire cutting rsa
PPTX
Diventare famosi con lo stack ELK
PDF
протокол6
PDF
Change Management Brochure
PPTX
Un día común de homus tóxicus
PPTX
Trabajo 2 ingles
PDF
Dave Goshorn - Resume
PDF
MAB Deck
PDF
TCA Cycle
PPTX
Ingles
PPTX
Influence campaign
PPTX
Ingles1
DOC
S Wilson 2016 Resume
Full Stack Toronto - the 3R Stack
The Future and Energy
React.js and Flux in details
Week11 1st draft
ติดตั้ง Postgres
Primer t
Project gt tire cutting rsa
Diventare famosi con lo stack ELK
протокол6
Change Management Brochure
Un día común de homus tóxicus
Trabajo 2 ingles
Dave Goshorn - Resume
MAB Deck
TCA Cycle
Ingles
Influence campaign
Ingles1
S Wilson 2016 Resume
Ad

Similar to BackboneJS + ReactJS (20)

PPTX
React JS .NET
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
PPTX
Presentation on "An Introduction to ReactJS"
PPTX
Combining Angular and React Together
PDF
Intro to React - Featuring Modern JavaScript
PDF
Introduction Web Development using ReactJS
PPTX
ReactJS presentation.pptx
PPTX
Comparing Angular and React JS for SPAs
PPTX
KnockOutjs from Scratch
PDF
Full Stack React Workshop [CSSC x GDSC]
PDF
react hook and wesite making structure ppt
PPTX
Writing HTML5 Web Apps using Backbone.js and GAE
PDF
Rp 6 session 2 naresh bhatia
PDF
React JS and Redux
PPTX
MV* presentation frameworks in Javascript: en garde, pret, allez!
PPTX
reactJS
PDF
Jinal desai .net
PPT
Backbone introdunction
PPTX
React JS Belgium Touch Base - React, Flux, React Native
PDF
Getting started with React and Redux
React JS .NET
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
Presentation on "An Introduction to ReactJS"
Combining Angular and React Together
Intro to React - Featuring Modern JavaScript
Introduction Web Development using ReactJS
ReactJS presentation.pptx
Comparing Angular and React JS for SPAs
KnockOutjs from Scratch
Full Stack React Workshop [CSSC x GDSC]
react hook and wesite making structure ppt
Writing HTML5 Web Apps using Backbone.js and GAE
Rp 6 session 2 naresh bhatia
React JS and Redux
MV* presentation frameworks in Javascript: en garde, pret, allez!
reactJS
Jinal desai .net
Backbone introdunction
React JS Belgium Touch Base - React, Flux, React Native
Getting started with React and Redux

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
KodekX | Application Modernization Development
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
Teaching material agriculture food technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
KodekX | Application Modernization Development
Review of recent advances in non-invasive hemoglobin estimation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Weekly Chronicles - August'25 Week I
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

BackboneJS + ReactJS

  • 2. Library vs Framework ??  A library performs specific, well-defined operations.  A framework is a collection of patterns and libraries to help with building an application.  Backbone.js (Model/Controller) - Framework  React.js (View) - Library “Frameworks skip Somework”
  • 3. BackboneJS Frontend uber-light MVC framework,with RESTful support & more flexible. Pros  can be easily integrated into an existing project & adding structure to Javascript...  My application is going to do a lot of heavy DOM manipulations & handle large chunk of data. Cons  Learning curve not as simple as other MVC  External dependencies like Jquery, Underscore.js  Non RESTful API backend  Nested backbone View difficult to maintain, every collection changes re-render all the views.
  • 4. Backbone Models Model encapsulate business logic and data var Todo = Backbone.Model.extend({ defaults: { title: 'backbone_title', }, initialize: function(){ console.log('This model has been initialized.'); }, setTitle: function(newTitle){ this.set({ title: newTitle }); } }); var myTodo = new Todo(); myTodo.setTitle('Backbone Hello world.');
  • 5. Backbone View  Views are responsible for listening to DOM element's events & updating the DOM elements.  View templates -- underscore.js handlebar.js var AppView = Backbone.View.extend({ // el - stands for element. Every view has a element associate in with HTML content will be rendered. el: '#container', initialize: function(){ this.render(); }, render: function(){ this.$el.html("Hello World"); } });
  • 6. ReactJS React is a UI library to facilitate the creation of interactive, stateful & reusable UI components.  Building large applications with data that changes over time.  It's just a View of M'V'C framework.  Virtual DOM (USP).  React has only “Components” that will just re-render.  Javascript + HTML = JSX  JSX - Allows us to write HTML like syntax which gets transformed to lightweight JavaScript objects.  Render in Server via node.js
  • 7. Components & LifeCycle Component = view/HTML + controller/JS React.createClass({ }) The way in which you create a new component. State -- Internal data,can change Prop -- External data,can't change UpdateCycle Component LifeCycle React.createClass() componentWillUnmount() getInitialState() componentDidMount() componentWillMount() Render() Render() componentWillUpdate() componentDidUpdate()
  • 8. Virtual DOM  when data has changed ??  which DOM element(s) to be updated??  Angular “Digest cycle” mechanism  On every update in the State  React's diffing algorithm DOM Structure Patch boolean shouldComponentUpdate()
  • 9. Architecture Traditional MVC  Difficult to organise the code  Good to use Asynchronous Module Definition (AMD) like require.js,browserify,gulp Flux Architecture Dispatcher acts as traffic controller. One-way data flow. dispatcheraction store view View model model model model view View View controller
  • 10. Challenges  Code maintenance (JS + HTML)  No two way data-binding  No separate Templates  Converting JSX to JS (Babel)  ReactJS Gotchas  Re-initialise datatables Alerts account landing page DEMO