SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Service Worker Presentation
Service Worker PresentationService Worker Presentation
Service Worker Presentation
Kyle Dorman
 
Clean Code I - Best Practices
Clean Code I - Best PracticesClean Code I - Best Practices
Clean Code I - Best Practices
Theo Jungeblut
 

Tendances (20)

Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
 
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project ReactorReactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Service Worker Presentation
Service Worker PresentationService Worker Presentation
Service Worker Presentation
 
React JS
React JSReact JS
React JS
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
JSON Web Token
JSON Web TokenJSON Web Token
JSON Web Token
 
ReactJS presentation.pptx
ReactJS presentation.pptxReactJS presentation.pptx
ReactJS presentation.pptx
 
Json web token
Json web tokenJson web token
Json web token
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
 
Flask – Python
Flask – PythonFlask – Python
Flask – Python
 
Clean Code I - Best Practices
Clean Code I - Best PracticesClean Code I - Best Practices
Clean Code I - Best Practices
 
Introduction to JWT and How to integrate with Spring Security
Introduction to JWT and How to integrate with Spring SecurityIntroduction to JWT and How to integrate with Spring Security
Introduction to JWT and How to integrate with Spring Security
 
React JS & Functional Programming Principles
React JS & Functional Programming PrinciplesReact JS & Functional Programming Principles
React JS & Functional Programming Principles
 
Node js
Node jsNode js
Node js
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
HyperLedger Fabric V2.5.pdf
HyperLedger Fabric V2.5.pdfHyperLedger Fabric V2.5.pdf
HyperLedger Fabric V2.5.pdf
 
Concurrency in Golang
Concurrency in GolangConcurrency in Golang
Concurrency in Golang
 

En vedette

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

En vedette (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
 

Similaire à Introduction to Backbone.js

Similaire à 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
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+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@
 

Dernier (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+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...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

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