SlideShare a Scribd company logo
INTRODUCTION TO BACKBONE JS
- Mohammed Saqib
AGENDA
2
Problems with JS
What is Backbone JS
Model –View - Presenter
Single Page Application
Why Backbone
Quick Facts
Real time applications using Backbone JS
Summary
References
PROBLEM WITH JAVASCRIPT APPLICATION
 Web application that involves a lot
of JavaScript applications end up
as tangled piles of JQuery selectors
and callbacks.
 Hard to keep data in sync between
the HTML UI, JavaScript logic & the
database.
 Pile of spaghetti code - code that is
disorganized and difficult to follow.
 Unstructured approach
3
JAVASCIRPT IS VERY POPULAR
WHAT IS BACKBONE JS
 Backbone JS is JavaScript library of components
with a RESTful JSON interface and is based on
the model–view–presenter (MVP) application
design paradigm.
 Very lightweight, as its only dependency is on
one JavaScript library, Underscore.js
 Underscore is a JavaScript library which provides
utility functions for common JavaScript tasks.
 It is designed for developing single-page web
applications and for keeping various parts of
web applications (e.g. multiple clients and the
server) synchronized.
Backbone JS is a framework?
 Backbone is library not a framework.
 Framework and library are the code written by some one else. This code
give us a functionality.
 In framework we change the structure of our code according to the rules
given by them. In order to use the functionality provided by them.
 In library we can use the functionality directly without changing our code.
 Frameworks need configuration, usually a HTML.
 Libraries have pre built functions ready to use. E.g. Jquery.
 Example:
– Libraries: knockout JS, Backbone JS
– Frameworks: Angular JS, Ember JS.
6
Backbone Organizes the code
 Creates clean and efficient code.
 Based on Model-View-Controller.
 Backbone Components:
– Models
– View
– Collections
– Events
– Router
7
 Model-view-presenter (MVP) is a derivative
of the MVC design pattern which focuses on
improving presentation logic.
 Presenter component contains the user
interface business logic for the view.
 The presenter acts as a mediator which talks
to both the view and model, however both
of these are isolated from each other.
 Make it very easy to handle complex views
and user interaction where MVC may not fit
the bill.
 Simplify maintenance greatly .
MVP
Single Page Application
 Also known as Single Page Interface(SPI).
 Provides a fluid user experience similar to a desktop application.
 Navigation is performed by changing the state.
 In SPA all the necessary codes like HTML, CSS and JavaScript are retrieved
in a single page load; or resources are loaded on demand without
reloading the page at any time.
 the web page is constructed by loading chunks of HTML fragments
Why SPA?
 Capable of decreasing subsequent load time of pages by storing the
functionality once it is loaded the first time.
 Achieve a complex user interface with minimal communication to server.
 To build very interactive and data driven dashboards and also build Event
driven application.
9
WHY BACKBONE JS
 Highly customizable.
 Minimalistic library has very small footprint. (6.5kb)
 Modularity and Reusability.
 Designed more towards consuming RESTful web service.
 Very easy to implement complex user interaction.
 Free to use any JavaScript template engine.
 Vibrant community of plugin and extension authors.
QUICK FAQ
Does it replace
jQuery?
• NO
• Complementary
in their scopes
with almost no
overlaps in
functionality
• Backbone handles
all the higher
level abstractions,
while jQuery – or
similar libraries –
work with the
DOM, normalize
events and so on
Where can I use
• Ideally suited for
creating front end
with heavy data
driven
applications
• Scales well, from
embedded
widgets to
massive apps
• Think Gmail
can still use other
libraries
• Absolutely.
• Typical DOM
accessing, AJAX
wrapping.
• The templates and
script loading
libraries.
• It's very, very
loosely coupled,
which means you
can use almost all of
your tools in
conjunction with
Backbone.
Has a steep learning curve.
As the code grows the application becomes difficult to manage, its
always better to use helper libraries to modularize the application.
(e.g. marionettejs, chaplinejs, layoutmanager etc)
Ineffective view management might lead to zombies views and
duplicate events
Nested collection and Nested model structure is difficult to manage
Backbone js is built for restful services which makes it troublesome
while dealing with soap and regular html responses.
14
CHALLENGES FACED
Real world Backbone.js
Applications
USA Today
Takes advantage of the
modularity of Backbone's
data/model lifecycle —
which makes it simple to
- create
- Inherit
-isolate
- link application objects
to keep the codebase
both manageable
and efficient.
Website also makes
heavy use of the
Backbone Router to
control the page for both
pushState-capable and
legacy browsers.
LinkedIn Mobile
 Backbone made it easy to keep
the app modular, organized and
extensible in order to improve
LinkedIn's user experience.
 Views are rendered using
underscore templates.
 Backbone models / collections –
To store the JSON data received
from the server.
 It uses RESTful API request
through Backbone.Sync - to read
or save a model to the server.
Wal-Mart Mobile
 To create the new version of their
mobile web application.
 Uses Backbone.js as core library of
their mobile shopping cart.
 created two new extension
frameworks in the process - Thorax
and Lumbar.
Airbnb
It started with Airbnb
Mobile Web and has
since grown to :
– Wish Lists
– Match
– Search
– Communities
– Payments
– Internal Tools
Airbnb uses Backbone.js
to let users and search
engines browse available
travel accommodations.
SUMMARY
 Limitations with plane JavaScript.
 What and Why of Backbone JS.
 Brief description about MVP and SPA.
 Frequently asked Queries and Clarifications.
 Big companies who use Backbone JS.
 Backbone has many operations and options and is
always evolving, so be sure to visit the official website
and documentation for more details and the latest
features.
20
21
Please, please, please !!!
A hammer is an excellent tool, but it’s not used for everything !!!
References
• http://backbonejs.org
• http://underscorejs.org
• http://addyosmani.github.io/backbone-fundamentals/
• http://www.pluralsight.com/training/Courses/Find?highlight=true&searchTerm=ba
ckbone
• http://backbonetutorials.com/
• http://www.codebeerstartups.com/2012/12/introduction-to-backbone-js-and-
setting-up-an-working-environment/
• http://code.tutsplus.com/tutorials/getting-started-with-backbonejs--net-19751
• https://www.youtube.com/watch?v=FZSjvWtUxYk
• http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-part-1-
getting-started/
QUESTIONS
Thank
You
Bangalore
Backbone JS
Hackers
24
Ad

More Related Content

What's hot (20)

Realtime web apps rails
Realtime web apps railsRealtime web apps rails
Realtime web apps rails
Ambert Ho
 
An introduction to knockout.js
An introduction to knockout.jsAn introduction to knockout.js
An introduction to knockout.js
Emanuele DelBono
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
Mindfire Solutions
 
Introduction to Knockoutjs
Introduction to KnockoutjsIntroduction to Knockoutjs
Introduction to Knockoutjs
jhoguet
 
DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalCampDN
 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
Mohammed Arif
 
Knockout js
Knockout jsKnockout js
Knockout js
shobokshi
 
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJSKarlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Philipp Burgmer
 
Single Page WebApp Architecture
Single Page WebApp ArchitectureSingle Page WebApp Architecture
Single Page WebApp Architecture
Morgan Cheng
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
BorisMoore
 
Managing JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSManaging JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJS
Den Odell
 
Knockout js session
Knockout js sessionKnockout js session
Knockout js session
Ravinder Mahajan
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
Spike Brehm
 
Backbonejs
BackbonejsBackbonejs
Backbonejs
SHASHI KUMAR
 
JsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesJsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery Templates
BorisMoore
 
Marionette: the Backbone framework
Marionette: the Backbone frameworkMarionette: the Backbone framework
Marionette: the Backbone framework
frontendne
 
Intro to Vue
Intro to Vue Intro to Vue
Intro to Vue
Isatu Conteh
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest
 
Realtime web apps rails
Realtime web apps railsRealtime web apps rails
Realtime web apps rails
Ambert Ho
 
An introduction to knockout.js
An introduction to knockout.jsAn introduction to knockout.js
An introduction to knockout.js
Emanuele DelBono
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
Mindfire Solutions
 
Introduction to Knockoutjs
Introduction to KnockoutjsIntroduction to Knockoutjs
Introduction to Knockoutjs
jhoguet
 
DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalCampDN
 
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJSKarlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Philipp Burgmer
 
Single Page WebApp Architecture
Single Page WebApp ArchitectureSingle Page WebApp Architecture
Single Page WebApp Architecture
Morgan Cheng
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
BorisMoore
 
Managing JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSManaging JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJS
Den Odell
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
Spike Brehm
 
JsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesJsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery Templates
BorisMoore
 
Marionette: the Backbone framework
Marionette: the Backbone frameworkMarionette: the Backbone framework
Marionette: the Backbone framework
frontendne
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest
 

Viewers also liked (8)

Javascript Application Architecture with Backbone.JS
Javascript Application Architecture with Backbone.JSJavascript Application Architecture with Backbone.JS
Javascript Application Architecture with Backbone.JS
Min Ming Lo
 
Backbone Basics with Examples
Backbone Basics with ExamplesBackbone Basics with Examples
Backbone Basics with Examples
Sergey Bolshchikov
 
Backbone js
Backbone jsBackbone js
Backbone js
husnara mohammad
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
Chris Neale
 
Creating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JSCreating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JS
Akshay Mathur
 
Introduction To Backbone JS
Introduction To Backbone JSIntroduction To Backbone JS
Introduction To Backbone JS
paramisoft
 
[2015/2016] Backbone JS
[2015/2016] Backbone JS[2015/2016] Backbone JS
[2015/2016] Backbone JS
Ivano Malavolta
 
Backbone js
Backbone jsBackbone js
Backbone js
Knoldus Inc.
 
Javascript Application Architecture with Backbone.JS
Javascript Application Architecture with Backbone.JSJavascript Application Architecture with Backbone.JS
Javascript Application Architecture with Backbone.JS
Min Ming Lo
 
Creating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JSCreating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JS
Akshay Mathur
 
Introduction To Backbone JS
Introduction To Backbone JSIntroduction To Backbone JS
Introduction To Backbone JS
paramisoft
 
Ad

Similar to Introduction to backbone_js (20)

Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
RajkumarJangid7
 
Top 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web DevelopmentTop 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web Development
Technostacks Infotech Pvt. Ltd.
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
How backbone.js is different from ember.js?
How backbone.js is different from ember.js?How backbone.js is different from ember.js?
How backbone.js is different from ember.js?
SoftProdigy - We know software!
 
Top java script frameworks ppt
Top java script frameworks pptTop java script frameworks ppt
Top java script frameworks ppt
Omkarsoft Bangalore
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
Hamid Ghorbani
 
Frameworks in java
Frameworks in javaFrameworks in java
Frameworks in java
Darshan Patel
 
Single Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for BeginnersSingle Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for Beginners
Inexture Solutions
 
Top 10 Differences Between React and JavaScript: A Detailed Comparison
Top 10 Differences Between React and JavaScript: A Detailed ComparisonTop 10 Differences Between React and JavaScript: A Detailed Comparison
Top 10 Differences Between React and JavaScript: A Detailed Comparison
Inwizards Software Technology
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
AI introduction to modern web technologies.pptx
AI  introduction to modern web technologies.pptxAI  introduction to modern web technologies.pptx
AI introduction to modern web technologies.pptx
AmrutaGourgonda
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
Chandrasekar G
 
AngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web ApplicationsAngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
 
Top Frontend Frameworks to Know for Modern Web Development.pptx
Top Frontend Frameworks to Know for Modern Web Development.pptxTop Frontend Frameworks to Know for Modern Web Development.pptx
Top Frontend Frameworks to Know for Modern Web Development.pptx
Ahex Technologies
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|
programmersclubonlin
 
React.js alternatives modern web frameworks and lightweight java script libr...
React.js alternatives  modern web frameworks and lightweight java script libr...React.js alternatives  modern web frameworks and lightweight java script libr...
React.js alternatives modern web frameworks and lightweight java script libr...
Katy Slemon
 
Intern project_presentation_news_app
Intern project_presentation_news_appIntern project_presentation_news_app
Intern project_presentation_news_app
Chandra Praneeth
 
What is mean stack?
What is mean stack?What is mean stack?
What is mean stack?
Rishabh Saxena
 
Skill practical javascript diy projects
Skill practical javascript diy projectsSkill practical javascript diy projects
Skill practical javascript diy projects
SkillPracticalEdTech
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
 
Single Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for BeginnersSingle Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for Beginners
Inexture Solutions
 
Top 10 Differences Between React and JavaScript: A Detailed Comparison
Top 10 Differences Between React and JavaScript: A Detailed ComparisonTop 10 Differences Between React and JavaScript: A Detailed Comparison
Top 10 Differences Between React and JavaScript: A Detailed Comparison
Inwizards Software Technology
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
AI introduction to modern web technologies.pptx
AI  introduction to modern web technologies.pptxAI  introduction to modern web technologies.pptx
AI introduction to modern web technologies.pptx
AmrutaGourgonda
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
Chandrasekar G
 
AngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web ApplicationsAngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
 
Top Frontend Frameworks to Know for Modern Web Development.pptx
Top Frontend Frameworks to Know for Modern Web Development.pptxTop Frontend Frameworks to Know for Modern Web Development.pptx
Top Frontend Frameworks to Know for Modern Web Development.pptx
Ahex Technologies
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|
programmersclubonlin
 
React.js alternatives modern web frameworks and lightweight java script libr...
React.js alternatives  modern web frameworks and lightweight java script libr...React.js alternatives  modern web frameworks and lightweight java script libr...
React.js alternatives modern web frameworks and lightweight java script libr...
Katy Slemon
 
Intern project_presentation_news_app
Intern project_presentation_news_appIntern project_presentation_news_app
Intern project_presentation_news_app
Chandra Praneeth
 
Skill practical javascript diy projects
Skill practical javascript diy projectsSkill practical javascript diy projects
Skill practical javascript diy projects
SkillPracticalEdTech
 
Ad

Recently uploaded (20)

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
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
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
 
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
 
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
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
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
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
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
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
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
 
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
 
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
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
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
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 

Introduction to backbone_js

  • 1. INTRODUCTION TO BACKBONE JS - Mohammed Saqib
  • 2. AGENDA 2 Problems with JS What is Backbone JS Model –View - Presenter Single Page Application Why Backbone Quick Facts Real time applications using Backbone JS Summary References
  • 3. PROBLEM WITH JAVASCRIPT APPLICATION  Web application that involves a lot of JavaScript applications end up as tangled piles of JQuery selectors and callbacks.  Hard to keep data in sync between the HTML UI, JavaScript logic & the database.  Pile of spaghetti code - code that is disorganized and difficult to follow.  Unstructured approach 3 JAVASCIRPT IS VERY POPULAR
  • 5.  Backbone JS is JavaScript library of components with a RESTful JSON interface and is based on the model–view–presenter (MVP) application design paradigm.  Very lightweight, as its only dependency is on one JavaScript library, Underscore.js  Underscore is a JavaScript library which provides utility functions for common JavaScript tasks.  It is designed for developing single-page web applications and for keeping various parts of web applications (e.g. multiple clients and the server) synchronized.
  • 6. Backbone JS is a framework?  Backbone is library not a framework.  Framework and library are the code written by some one else. This code give us a functionality.  In framework we change the structure of our code according to the rules given by them. In order to use the functionality provided by them.  In library we can use the functionality directly without changing our code.  Frameworks need configuration, usually a HTML.  Libraries have pre built functions ready to use. E.g. Jquery.  Example: – Libraries: knockout JS, Backbone JS – Frameworks: Angular JS, Ember JS. 6
  • 7. Backbone Organizes the code  Creates clean and efficient code.  Based on Model-View-Controller.  Backbone Components: – Models – View – Collections – Events – Router 7
  • 8.  Model-view-presenter (MVP) is a derivative of the MVC design pattern which focuses on improving presentation logic.  Presenter component contains the user interface business logic for the view.  The presenter acts as a mediator which talks to both the view and model, however both of these are isolated from each other.  Make it very easy to handle complex views and user interaction where MVC may not fit the bill.  Simplify maintenance greatly . MVP
  • 9. Single Page Application  Also known as Single Page Interface(SPI).  Provides a fluid user experience similar to a desktop application.  Navigation is performed by changing the state.  In SPA all the necessary codes like HTML, CSS and JavaScript are retrieved in a single page load; or resources are loaded on demand without reloading the page at any time.  the web page is constructed by loading chunks of HTML fragments Why SPA?  Capable of decreasing subsequent load time of pages by storing the functionality once it is loaded the first time.  Achieve a complex user interface with minimal communication to server.  To build very interactive and data driven dashboards and also build Event driven application. 9
  • 11.  Highly customizable.  Minimalistic library has very small footprint. (6.5kb)  Modularity and Reusability.  Designed more towards consuming RESTful web service.  Very easy to implement complex user interaction.  Free to use any JavaScript template engine.  Vibrant community of plugin and extension authors.
  • 13. Does it replace jQuery? • NO • Complementary in their scopes with almost no overlaps in functionality • Backbone handles all the higher level abstractions, while jQuery – or similar libraries – work with the DOM, normalize events and so on Where can I use • Ideally suited for creating front end with heavy data driven applications • Scales well, from embedded widgets to massive apps • Think Gmail can still use other libraries • Absolutely. • Typical DOM accessing, AJAX wrapping. • The templates and script loading libraries. • It's very, very loosely coupled, which means you can use almost all of your tools in conjunction with Backbone.
  • 14. Has a steep learning curve. As the code grows the application becomes difficult to manage, its always better to use helper libraries to modularize the application. (e.g. marionettejs, chaplinejs, layoutmanager etc) Ineffective view management might lead to zombies views and duplicate events Nested collection and Nested model structure is difficult to manage Backbone js is built for restful services which makes it troublesome while dealing with soap and regular html responses. 14 CHALLENGES FACED
  • 16. USA Today Takes advantage of the modularity of Backbone's data/model lifecycle — which makes it simple to - create - Inherit -isolate - link application objects to keep the codebase both manageable and efficient. Website also makes heavy use of the Backbone Router to control the page for both pushState-capable and legacy browsers.
  • 17. LinkedIn Mobile  Backbone made it easy to keep the app modular, organized and extensible in order to improve LinkedIn's user experience.  Views are rendered using underscore templates.  Backbone models / collections – To store the JSON data received from the server.  It uses RESTful API request through Backbone.Sync - to read or save a model to the server.
  • 18. Wal-Mart Mobile  To create the new version of their mobile web application.  Uses Backbone.js as core library of their mobile shopping cart.  created two new extension frameworks in the process - Thorax and Lumbar.
  • 19. Airbnb It started with Airbnb Mobile Web and has since grown to : – Wish Lists – Match – Search – Communities – Payments – Internal Tools Airbnb uses Backbone.js to let users and search engines browse available travel accommodations.
  • 20. SUMMARY  Limitations with plane JavaScript.  What and Why of Backbone JS.  Brief description about MVP and SPA.  Frequently asked Queries and Clarifications.  Big companies who use Backbone JS.  Backbone has many operations and options and is always evolving, so be sure to visit the official website and documentation for more details and the latest features. 20
  • 21. 21 Please, please, please !!! A hammer is an excellent tool, but it’s not used for everything !!!
  • 22. References • http://backbonejs.org • http://underscorejs.org • http://addyosmani.github.io/backbone-fundamentals/ • http://www.pluralsight.com/training/Courses/Find?highlight=true&searchTerm=ba ckbone • http://backbonetutorials.com/ • http://www.codebeerstartups.com/2012/12/introduction-to-backbone-js-and- setting-up-an-working-environment/ • http://code.tutsplus.com/tutorials/getting-started-with-backbonejs--net-19751 • https://www.youtube.com/watch?v=FZSjvWtUxYk • http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-part-1- getting-started/

Editor's Notes

  • #4: glue code that looks into the DOM to find an element with a specific id, and update the HTML manually
  • #6: Handling complex user events Persistently sync data between client - server