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

More Related Content

What's hot

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
 

What's hot (20)

Realtime web apps rails
Realtime web apps railsRealtime web apps rails
Realtime web apps rails
 
An introduction to knockout.js
An introduction to knockout.jsAn introduction to knockout.js
An introduction to knockout.js
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
 
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
 
Introduction to Knockoutjs
Introduction to KnockoutjsIntroduction to Knockoutjs
Introduction to Knockoutjs
 
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...
 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
 
Knockout js
Knockout jsKnockout js
Knockout js
 
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJSKarlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
 
Single Page WebApp Architecture
Single Page WebApp ArchitectureSingle Page WebApp Architecture
Single Page WebApp Architecture
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
 
Managing JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJSManaging JavaScript Dependencies With RequireJS
Managing JavaScript Dependencies With RequireJS
 
Knockout js session
Knockout js sessionKnockout js session
Knockout js session
 
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
 
Backbonejs
BackbonejsBackbonejs
Backbonejs
 
JsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery TemplatesJsViews - Next Generation jQuery Templates
JsViews - Next Generation jQuery Templates
 
Marionette: the Backbone framework
Marionette: the Backbone frameworkMarionette: the Backbone framework
Marionette: the Backbone framework
 
Intro to Vue
Intro to Vue Intro to Vue
Intro to Vue
 
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
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложенияCodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
 

Viewers also liked

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.
 

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
 
Backbone Basics with Examples
Backbone Basics with ExamplesBackbone Basics with Examples
Backbone Basics with Examples
 
Backbone js
Backbone jsBackbone js
Backbone js
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
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
 
Introduction To Backbone JS
Introduction To Backbone JSIntroduction To Backbone JS
Introduction To Backbone JS
 
[2015/2016] Backbone JS
[2015/2016] Backbone JS[2015/2016] Backbone JS
[2015/2016] Backbone JS
 
Backbone js
Backbone jsBackbone js
Backbone js
 

Similar to Introduction to backbone_js

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
 
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
 
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
 
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
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
Pedro Melo Pereira
 
Pablo Villalba -
Pablo Villalba - Pablo Villalba -
Pablo Villalba -
.toster
 
Best JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptxBest JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptx
Codenance
 

Similar to Introduction to backbone_js (20)

Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
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
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
 
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?
 
Top java script frameworks ppt
Top java script frameworks pptTop java script frameworks ppt
Top java script frameworks ppt
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
 
Frameworks in java
Frameworks in javaFrameworks in java
Frameworks in java
 
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
 
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
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
 
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
 
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|
 
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...
 
Intern project_presentation_news_app
Intern project_presentation_news_appIntern project_presentation_news_app
Intern project_presentation_news_app
 
What is mean stack?
What is mean stack?What is mean stack?
What is mean stack?
 
Skill practical javascript diy projects
Skill practical javascript diy projectsSkill practical javascript diy projects
Skill practical javascript diy projects
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
 
Pablo Villalba -
Pablo Villalba - Pablo Villalba -
Pablo Villalba -
 
Best JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptxBest JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptx
 

Recently uploaded

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

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

  1. glue code that looks into the DOM to find an element with a specific id, and update the HTML manually
  2. Handling complex user events Persistently sync data between client - server