SlideShare una empresa de Scribd logo
1 de 14
Introduction to
Backbone.js
Pragnesh Vaghela | @technologythree | technologythree.com
Problem
1. web application that involves a lot of JavaScript
2. applications end up as tangled piles of jQuery
selectors and callbacks
3. hard to keep data in sync between the HTML UI,
JavaScript logic & the database
4. you can end up with a pile of spaghetti code - code
that is disorganized and difficult to follow
@ 2013 Technology Three 2
What is Backbone.js?
1. lightweight JavaScript library that adds structure to
your client-side code
2. makes it easy to manage and decouple concerns in
your application
3. MVC for the client
4. open sourced by company called DocumentCloud
5. light weight at under 4kb
@ 2013 Technology Three 3
Backbone.js MVC
1. your data as Models, which can be created, validated,
destroyed, and saved to the server
2. UI action causes an attribute of a model to change, the
model triggers a "change" event; all the Views that display
the model's state can be notified of the change, so that they
are able to respond accordingly, re-rendering themselves
with the new information
3. when the model changes, the views simply update
themselves
4. Backbone.Router provides methods for routing client-side
pages, and connecting them to actions and events.
@ 2013 Technology Three 4
Backbone.js dependencies
1. only hard dependency is either Underscore.js ( >=
1.4.3) or Lo-Dash
2. either jQuery ( >= 1.7.0)or Zepto
@ 2013 Technology Three 5
Does it replace jQuery?
1. NO
2. complementary in their scopes with almost no
overlaps in functionality
3. Backbone handles all the higher level abstractions,
while jQuery – or similar libraries – work with the
DOM, normalize events and so on
@ 2013 Technology Three 6
Where should I use Backbone.js?
1. ideally suited for creating front end heavy, data
driven applications
2. scales well, from embedded widgets to massive
apps
3. think Gmail
@ 2013 Technology Three 7
@ 2013 Technology Three 8
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, and 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
@ 2013 Technology Three 9
LinkedIn Mobile
to create its next-
generation HTML5
mobile web app.
Backbone made it
easy to keep the app
modular, organized
and extensible so
that it was possible
to program the
complexities of
LinkedIn's user
experience
@ 2013 Technology Three 10
Walmart Mobile
to create the new version of
their mobile web application
@ 2013 Technology Three 11
Airbnb
in many of its
products. It started
with Airbnb Mobile
Web (built in 6
weeks by a team of
3) and has since
grown to Wish
Lists, Match,
Search,
Communities,
Payments, and
Internal Tools
@ 2013 Technology Three 12
Pandora
to help manage the
user interface and
interactions. For
example, there's a
model that represents
the "currently playing
track", and multiple
views that
automatically update
when the current
track changes. The
station list is a
collection, so that
when stations are
added or changed, the
UI stays up to date
@ 2013 Technology Three 13
Thank You
Pragnesh Vaghela | @technologythree | technologythree.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
http presentation 1.pptx
http presentation 1.pptxhttp presentation 1.pptx
http presentation 1.pptx
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
Web scraping & browser automation
Web scraping & browser automationWeb scraping & browser automation
Web scraping & browser automation
 
Php
PhpPhp
Php
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
WEB DEVELOPMENT USING REACT JS
 WEB DEVELOPMENT USING REACT JS WEB DEVELOPMENT USING REACT JS
WEB DEVELOPMENT USING REACT JS
 
Javascript
JavascriptJavascript
Javascript
 
jQuery Ajax
jQuery AjaxjQuery Ajax
jQuery Ajax
 
Flutter talkshow
Flutter talkshowFlutter talkshow
Flutter talkshow
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Laravel Eloquent ORM
Laravel Eloquent ORMLaravel Eloquent ORM
Laravel Eloquent ORM
 
Web 3.0 The Semantic Web
Web 3.0 The Semantic WebWeb 3.0 The Semantic Web
Web 3.0 The Semantic Web
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
Intro to WebSockets
Intro to WebSocketsIntro to WebSockets
Intro to WebSockets
 
HTML5 Tutorial
HTML5 TutorialHTML5 Tutorial
HTML5 Tutorial
 
Html5 Basics
Html5 BasicsHtml5 Basics
Html5 Basics
 

Destacado

Backbone.js
Backbone.jsBackbone.js
Backbone.js
tonyskn
 
Backbone.js slides
Backbone.js slidesBackbone.js slides
Backbone.js slides
Ambert Ho
 

Destacado (20)

Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Introduction To Backbone JS
Introduction To Backbone JSIntroduction To Backbone JS
Introduction To Backbone JS
 
Introduction to Backbone - Workshop
Introduction to Backbone - WorkshopIntroduction to Backbone - Workshop
Introduction to Backbone - Workshop
 
Structuring web applications with Backbone.js
Structuring web applications with Backbone.jsStructuring web applications with Backbone.js
Structuring web applications with Backbone.js
 
Backbone.js slides
Backbone.js slidesBackbone.js slides
Backbone.js slides
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Backbone Basics with Examples
Backbone Basics with ExamplesBackbone Basics with Examples
Backbone Basics with Examples
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 
Sockets and rails
Sockets and railsSockets and rails
Sockets and rails
 
Introduction à Marionette
Introduction à MarionetteIntroduction à Marionette
Introduction à Marionette
 
Introduction to Backbone.js
Introduction to Backbone.jsIntroduction to Backbone.js
Introduction to Backbone.js
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Intro to Backbone.js by Azat Mardanov for General Assembly
Intro to Backbone.js by Azat Mardanov for General AssemblyIntro to Backbone.js by Azat Mardanov for General Assembly
Intro to Backbone.js by Azat Mardanov for General Assembly
 
Introduction to Backbone.js
Introduction to Backbone.jsIntroduction to Backbone.js
Introduction to Backbone.js
 
AngularJS vs. Ember.js vs. Backbone.js
AngularJS vs. Ember.js vs. Backbone.jsAngularJS vs. Ember.js vs. Backbone.js
AngularJS vs. Ember.js vs. Backbone.js
 
Backbone And Marionette : Take Over The World
Backbone And Marionette : Take Over The WorldBackbone And Marionette : Take Over The World
Backbone And Marionette : Take Over The World
 
Beautiful Maintainable ModularJavascript Codebase with RequireJS - HelsinkiJ...
 Beautiful Maintainable ModularJavascript Codebase with RequireJS - HelsinkiJ... Beautiful Maintainable ModularJavascript Codebase with RequireJS - HelsinkiJ...
Beautiful Maintainable ModularJavascript Codebase with RequireJS - HelsinkiJ...
 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
 
Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]
 
Backbone/Marionette introduction
Backbone/Marionette introductionBackbone/Marionette introduction
Backbone/Marionette introduction
 

Similar a Introduction to Backbone.js

Similar a Introduction to Backbone.js (20)

FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JS
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022
 
AJAX vs. jQuery What Are The Differences.pdf
AJAX vs. jQuery What Are The Differences.pdfAJAX vs. jQuery What Are The Differences.pdf
AJAX vs. jQuery What Are The Differences.pdf
 
www.webre24h.com - An ajax tool for online modeling
www.webre24h.com - An ajax tool for online modelingwww.webre24h.com - An ajax tool for online modeling
www.webre24h.com - An ajax tool for online modeling
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
Vue Or React - Which One is the Best_.pptx
Vue Or React - Which One is the Best_.pptxVue Or React - Which One is the Best_.pptx
Vue Or React - Which One is the Best_.pptx
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
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?
 
Meteor Mobile App Development
Meteor Mobile App DevelopmentMeteor Mobile App Development
Meteor Mobile App Development
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
 
How Can the Hermes Engine Help React Native Apps.
How Can the Hermes Engine Help React Native Apps.How Can the Hermes Engine Help React Native Apps.
How Can the Hermes Engine Help React Native Apps.
 
Architecting an ASP.NET MVC Solution
Architecting an ASP.NET MVC SolutionArchitecting an ASP.NET MVC Solution
Architecting an ASP.NET MVC Solution
 
Mvp pattern
Mvp patternMvp pattern
Mvp pattern
 
Top java script frameworks ppt
Top java script frameworks pptTop java script frameworks ppt
Top java script frameworks ppt
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
HTML5 Handling Security Issues, Security Threats for HTML5, HTML5 Application...
HTML5 Handling Security Issues, Security Threats for HTML5, HTML5 Application...HTML5 Handling Security Issues, Security Threats for HTML5, HTML5 Application...
HTML5 Handling Security Issues, Security Threats for HTML5, HTML5 Application...
 
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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Introduction to Backbone.js

  • 1. Introduction to Backbone.js Pragnesh Vaghela | @technologythree | technologythree.com
  • 2. Problem 1. web application that involves a lot of JavaScript 2. applications end up as tangled piles of jQuery selectors and callbacks 3. hard to keep data in sync between the HTML UI, JavaScript logic & the database 4. you can end up with a pile of spaghetti code - code that is disorganized and difficult to follow @ 2013 Technology Three 2
  • 3. What is Backbone.js? 1. lightweight JavaScript library that adds structure to your client-side code 2. makes it easy to manage and decouple concerns in your application 3. MVC for the client 4. open sourced by company called DocumentCloud 5. light weight at under 4kb @ 2013 Technology Three 3
  • 4. Backbone.js MVC 1. your data as Models, which can be created, validated, destroyed, and saved to the server 2. UI action causes an attribute of a model to change, the model triggers a "change" event; all the Views that display the model's state can be notified of the change, so that they are able to respond accordingly, re-rendering themselves with the new information 3. when the model changes, the views simply update themselves 4. Backbone.Router provides methods for routing client-side pages, and connecting them to actions and events. @ 2013 Technology Three 4
  • 5. Backbone.js dependencies 1. only hard dependency is either Underscore.js ( >= 1.4.3) or Lo-Dash 2. either jQuery ( >= 1.7.0)or Zepto @ 2013 Technology Three 5
  • 6. Does it replace jQuery? 1. NO 2. complementary in their scopes with almost no overlaps in functionality 3. Backbone handles all the higher level abstractions, while jQuery – or similar libraries – work with the DOM, normalize events and so on @ 2013 Technology Three 6
  • 7. Where should I use Backbone.js? 1. ideally suited for creating front end heavy, data driven applications 2. scales well, from embedded widgets to massive apps 3. think Gmail @ 2013 Technology Three 7
  • 8. @ 2013 Technology Three 8 Real world Backbone.js Applications
  • 9. USA Today takes advantage of the modularity of Backbone's data/model lifecycle — which makes it simple to create, inherit, isolate, and 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 @ 2013 Technology Three 9
  • 10. LinkedIn Mobile to create its next- generation HTML5 mobile web app. Backbone made it easy to keep the app modular, organized and extensible so that it was possible to program the complexities of LinkedIn's user experience @ 2013 Technology Three 10
  • 11. Walmart Mobile to create the new version of their mobile web application @ 2013 Technology Three 11
  • 12. Airbnb in many of its products. It started with Airbnb Mobile Web (built in 6 weeks by a team of 3) and has since grown to Wish Lists, Match, Search, Communities, Payments, and Internal Tools @ 2013 Technology Three 12
  • 13. Pandora to help manage the user interface and interactions. For example, there's a model that represents the "currently playing track", and multiple views that automatically update when the current track changes. The station list is a collection, so that when stations are added or changed, the UI stays up to date @ 2013 Technology Three 13
  • 14. Thank You Pragnesh Vaghela | @technologythree | technologythree.com