SlideShare a Scribd company logo
Give Your Web Apps
Some Backbone
  {   Using Backbone.JS to create a single-page web app
   Model – View – Controller
           First showed up in SmallTalk-80 in the 70’s
           One of the first patterns to describe software in
            terms of responsibilities rather than
            implementations
           Eventually evolved to apply to lots of GUI
            programming, most recently web applications




History Lesson: MVC
   Model
           Represents a data object and its functionality (i.e.
            a Domain object)
       View
           Displays information within an application.
            Little to no logic other than what’s required to
            display information from the model
       Controller (or Presenter)
           Handles events from the user (and View) and
            interacts with the Model




“Classic” MVC
Model        View        Browser


                Presentation
                   Layer



                  Controller




       Application Server


Typical Web MVC
   Same general idea – separation of concerns in
        model, view, and controller
       AJAX and improvements in the browser have
        made client-side rendering much more
        powerful
       More powerful client-side scripts as well as
        highly interactive websites required a more
        structured approach




JavaScript MVC
Server   Model              View


                         Presentation
                            Layer



                              Controller




                    Browser


JavaScript MVC
   Library created by DocumentCloud to give
        structure to web applications using MVC
        concepts
       Provides a RESTful persistence interface
       Event system to communicate between layers
       Convenience methods for working with
        collections of data
       Routing for client-side URLs




Enter Backbone.js
Code Time!
   Separation of concerns
           Client browser is responsible for managing
            HTML, events
           Server is only responsible for managing data
       Lends itself well to an API-first approach
       Everything is retrieved on initial page load
           Important for mobile devices
       Allows for a stateful web application




Why Client-Side MVC?
   Embraces extensibility out of the box
       Not as opinionated as other JavaScript MV*
        frameworks
       Vanilla backbone requires some setup, but
        there are libraries to make setup and binding
        easier
       Lots of extensions – 4200 repositories in GitHub




Why Backbone?
   User bookmarking may be affected
           Use Backbone.Router
       Search Engine Optimization doesn’t work so
        well with JavaScript
           Ensure searchable information is accessable in
            HTML / with JS turned off
       Services that rely on page loads might be
        affected (i.e. Google Analytics, advertising)
           Work with services’ API, usually can use hidden
            iframe to simulate page visits




Things to be aware of

More Related Content

What's hot (20)

ODP
What is MVC?
Dom Cimafranca
 
PDF
MVC architecture
Emily Bauman
 
PPT
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
PPTX
A Smooth Transition to HTML5 Using MVVM
Chris Bannon
 
PPTX
ASP.NET MVC4 Overview
Mahmoud Tolba
 
PPTX
codeigniter
Utkarsh Chaturvedi
 
PPTX
Mvc Brief Overview
rainynovember12
 
PPT
Introduction to ASP.NET MVC
Sunpawet Somsin
 
PPTX
MVC Framework
Ashton Feller
 
PPT
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
PPTX
MVC & backbone.js
Mohammed Arif
 
PPTX
Angular js anupama
Anupama Prabhudesai
 
PPTX
Introduction to mvc architecture
ravindraquicsolv
 
PDF
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...
Idexcel Technologies
 
PPTX
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam
 
PPT
Asp.net mvc
Naga Harish M
 
PPSX
Asp.net mvc
Anurag Gupta
 
PPTX
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Tom Walker
 
PPTX
Backbone.js
898RakeshWaghmare
 
What is MVC?
Dom Cimafranca
 
MVC architecture
Emily Bauman
 
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
A Smooth Transition to HTML5 Using MVVM
Chris Bannon
 
ASP.NET MVC4 Overview
Mahmoud Tolba
 
codeigniter
Utkarsh Chaturvedi
 
Mvc Brief Overview
rainynovember12
 
Introduction to ASP.NET MVC
Sunpawet Somsin
 
MVC Framework
Ashton Feller
 
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
MVC & backbone.js
Mohammed Arif
 
Angular js anupama
Anupama Prabhudesai
 
Introduction to mvc architecture
ravindraquicsolv
 
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...
Idexcel Technologies
 
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam
 
Asp.net mvc
Naga Harish M
 
Asp.net mvc
Anurag Gupta
 
Mortal Kombat! ASP.NET MVC vs ASP.NET Webforms – ASP.NET MVC is amazing
Tom Walker
 
Backbone.js
898RakeshWaghmare
 

Viewers also liked (6)

PPTX
Node.js
RTigger
 
PPTX
What The F#
RTigger
 
PPTX
JavaScript!
RTigger
 
PPTX
Total Engagement
RTigger
 
PPTX
Reactive Extensions
RTigger
 
PPTX
Single page apps and the web of tomorrow
RTigger
 
Node.js
RTigger
 
What The F#
RTigger
 
JavaScript!
RTigger
 
Total Engagement
RTigger
 
Reactive Extensions
RTigger
 
Single page apps and the web of tomorrow
RTigger
 
Ad

Similar to Give your web apps some backbone (20)

PPTX
Planbox Backbone MVC
Acquisio
 
PPTX
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
PPTX
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 
PPTX
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
 
PDF
Viking academy backbone.js
Bert Wijnants
 
PPTX
Javascript for Wep Apps
Michael Puckett
 
PPTX
AngularJS UTOSC
roboncode
 
PDF
Rp 6 session 2 naresh bhatia
sapientindia
 
PDF
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
PDF
Developing Backbonejs Applications Early Release Addy Osmani
littelenkali
 
PDF
jQquerysummit - Large-scale JavaScript Application Architecture
Jiby John
 
PDF
Intro to BackboneJS + Intermediate Javascript
Andrew Lovett-Barron
 
PPTX
Backbone.js
VO Tho
 
PDF
Angular JS Basics
Mounish Sai
 
PPTX
Introduction to Knockoutjs
jhoguet
 
PDF
Workshop 9: BackboneJS y patrones MVC
Visual Engineering
 
PPSX
Introduction to backbone_js
Mohammed Saqib
 
PDF
Backbone.js slides
Ambert Ho
 
PPTX
Show Some Spine!
Geoff Gerrietts
 
PPT
Intro to-html-backbone
zonathen
 
Planbox Backbone MVC
Acquisio
 
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Single Page Application Development with backbone.js and Simple.Web
Chris Canal
 
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
 
Viking academy backbone.js
Bert Wijnants
 
Javascript for Wep Apps
Michael Puckett
 
AngularJS UTOSC
roboncode
 
Rp 6 session 2 naresh bhatia
sapientindia
 
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
Developing Backbonejs Applications Early Release Addy Osmani
littelenkali
 
jQquerysummit - Large-scale JavaScript Application Architecture
Jiby John
 
Intro to BackboneJS + Intermediate Javascript
Andrew Lovett-Barron
 
Backbone.js
VO Tho
 
Angular JS Basics
Mounish Sai
 
Introduction to Knockoutjs
jhoguet
 
Workshop 9: BackboneJS y patrones MVC
Visual Engineering
 
Introduction to backbone_js
Mohammed Saqib
 
Backbone.js slides
Ambert Ho
 
Show Some Spine!
Geoff Gerrietts
 
Intro to-html-backbone
zonathen
 
Ad

More from RTigger (14)

PPTX
You Can't Buy Agile
RTigger
 
PPTX
Caching up is hard to do: Improving your Web Services' Performance
RTigger
 
PPTX
Ready, set, go! An introduction to the Go programming language
RTigger
 
PPTX
Open source web services
RTigger
 
PPTX
How to hire a hacker
RTigger
 
PPTX
Windows 8 programming with html and java script
RTigger
 
PPTX
Open regina
RTigger
 
PPTX
Async in .NET
RTigger
 
PPTX
Hackers, hackathons, and you
RTigger
 
PPTX
AJAX, JSON, and Client-Side Templates
RTigger
 
PPTX
Parallel Processing
RTigger
 
PPTX
Sql vs NoSQL
RTigger
 
PPTX
Git’in Jiggy With Git
RTigger
 
PPTX
Web Services
RTigger
 
You Can't Buy Agile
RTigger
 
Caching up is hard to do: Improving your Web Services' Performance
RTigger
 
Ready, set, go! An introduction to the Go programming language
RTigger
 
Open source web services
RTigger
 
How to hire a hacker
RTigger
 
Windows 8 programming with html and java script
RTigger
 
Open regina
RTigger
 
Async in .NET
RTigger
 
Hackers, hackathons, and you
RTigger
 
AJAX, JSON, and Client-Side Templates
RTigger
 
Parallel Processing
RTigger
 
Sql vs NoSQL
RTigger
 
Git’in Jiggy With Git
RTigger
 
Web Services
RTigger
 

Recently uploaded (20)

PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
The Future of Artificial Intelligence (AI)
Mukul
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 

Give your web apps some backbone

  • 1. Give Your Web Apps Some Backbone { Using Backbone.JS to create a single-page web app
  • 2. Model – View – Controller  First showed up in SmallTalk-80 in the 70’s  One of the first patterns to describe software in terms of responsibilities rather than implementations  Eventually evolved to apply to lots of GUI programming, most recently web applications History Lesson: MVC
  • 3. Model  Represents a data object and its functionality (i.e. a Domain object)  View  Displays information within an application. Little to no logic other than what’s required to display information from the model  Controller (or Presenter)  Handles events from the user (and View) and interacts with the Model “Classic” MVC
  • 4. Model View Browser Presentation Layer Controller Application Server Typical Web MVC
  • 5. Same general idea – separation of concerns in model, view, and controller  AJAX and improvements in the browser have made client-side rendering much more powerful  More powerful client-side scripts as well as highly interactive websites required a more structured approach JavaScript MVC
  • 6. Server Model View Presentation Layer Controller Browser JavaScript MVC
  • 7. Library created by DocumentCloud to give structure to web applications using MVC concepts  Provides a RESTful persistence interface  Event system to communicate between layers  Convenience methods for working with collections of data  Routing for client-side URLs Enter Backbone.js
  • 9. Separation of concerns  Client browser is responsible for managing HTML, events  Server is only responsible for managing data  Lends itself well to an API-first approach  Everything is retrieved on initial page load  Important for mobile devices  Allows for a stateful web application Why Client-Side MVC?
  • 10. Embraces extensibility out of the box  Not as opinionated as other JavaScript MV* frameworks  Vanilla backbone requires some setup, but there are libraries to make setup and binding easier  Lots of extensions – 4200 repositories in GitHub Why Backbone?
  • 11. User bookmarking may be affected  Use Backbone.Router  Search Engine Optimization doesn’t work so well with JavaScript  Ensure searchable information is accessable in HTML / with JS turned off  Services that rely on page loads might be affected (i.e. Google Analytics, advertising)  Work with services’ API, usually can use hidden iframe to simulate page visits Things to be aware of