SlideShare a Scribd company logo
SELA DEVELOPER PRACTICE
Gil Fink
Single Page Applications
with Backbone.js
• The Road to Single Page Apps
• What is a SPA?
• SPA Building Blocks and Architecture
• AMD and RequireJS
• MVC using Backbone.js
• A Simple SPA
Agenda
RIA
Web
Apps
Websites
Thin
Clients
and App
Stores
The Road to Single Page Apps
Native
Apps
Click-
Once
SPA
Embedded
Objects (Flash,
Silverlight, Java
Applets …)
Traditional Web Apps
HTTP requests translated into user actions
The state persisted in the server side
The server translates the user action
The server translates its response to HTML
The browser displays the HTML response
Traditional Native Apps
State is persisted in the client-side
Compiled programming language is used
The application is platform dependent
An installation may be required
What is a Single Page App (SPA)?
A web application
No need for full page submit
No full refresh
No embedded objects
Client-side routing
Why to Develop SPAs?
Feature Web App Native App Single Page App
Cross Platform V X V
Client State
Management
X V V
No Installation
required
V X V
Web
App
Native
App
SPA
SPA Building Blocks
HTML5
JavaScript Libraries
Ajax
REST
SPA
Web API
HTML5
Supported by most modern browsers
Include variety of new JavaScript APIs that can
help to:
Store data locally
Save data across application shutdowns
Communicate with the server in new ways
Such as CORS and Web Sockets
Increase web performance with new APIs and new
mechanisms
Ajax
Asynchronously call server endpoints
Non blocking operations
You can maintain state in the client and go to
the server without refreshing the whole page
Has opened the road for richer client-side UX
JavaScript Libraries/Frameworks
REST
Stands for REpresntational State Transfer
Architecture style
Designed to work with HTTP
Using HTTP verbs (POST, GET, PUT, DELETE)
Performs Create, Read, Update and Delete operations
respectively
Can also use other HTTP verbs
Can receive and send data in variety of formats
JSON, XML, HTML, XHTML, Blob and more
Web API
The server is used only as API
Each API Function is an endpoint in the server
No need for server rendering
No need for server routing
Client-Side Routing
The main building block in a SPA
All routing is done in the client-side
You use a routing library/framework
When a route change happens, the library/framework
intercepts the navigation and impose your functionality
SPA Architecture
Asynchronous Module Definitions (AMD)
Define modules such that the module and its
dependencies can be asynchronously loaded
RequireJS Library
A module framework in the browser
Can be downloaded from
http://requirejs.org/
Browser friendly API
Concepts supported in Node.js as well
Defines a structure for files layout
Uses conventions to perform lookups for dependencies
Demo
RequireJS
MVC using Backbone.js
Backbone.js is a small MVW library
Enforces structure to your JavaScript code
Includes only 5 main objects:
Models
Collections
Views
Routers
Events
MVC using Backbone.js – Cont.
Extending one of Backbone.js main objects
To include built-in Backbone.js functionality
To create your own custom functionality
var myModel = Backbone.Model.extend({
defaults: {
myModelID: 0,
myModelName: ‘’
}
});
Var myCollection = Backbone.Collection.extend({
model: myModel
});
var myRouter = Backbone.Router.extend({
routes: {
‘’: home
},
home: function() {
// create the home view
}
});
Demo
A Simple SPA
Questions
Summary
• SPAs are entire web apps built upon one page
and JavaScript interactions
• Very suitable for mobile development
• SPAs are the way to build your next web apps!
Thank You

More Related Content

What's hot (20)

PPTX
SoCal Code Camp 2011 - ASP.NET 4.5
Jon Galloway
 
PPTX
Rest assured
Yaniv Rodenski
 
PDF
Basic method for Java EE Web Profile
Kenji HASUNUMA
 
PPTX
MSDN Sessions 032817 - Azure Functions
Marc Obaldo
 
PPTX
Web applications
Peter Berezny
 
PDF
Single Page Apps
Max Claus Nunes
 
PPTX
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
Sencha
 
PPTX
Single Page Applications on JavaScript and ASP.NET MVC4
Yuriy Shapovalov
 
PDF
Progressive Web Apps
Kranthi Lakum
 
PPTX
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Mazenetsolution
 
PPTX
Road Trip To Component
Marketa Adamova
 
PPTX
Single page webapplications
Ronald Harmsen
 
DOCX
Client side vs server side
abgjim96
 
PDF
Em presentation victor herman
Victor Herman
 
PDF
APIdays San Francisco, 06/22/2013
Jerome Louvel
 
PDF
Asp.net
KIRTI PRADHAN
 
PPTX
Vertical Slices in .NET - Bojan Veljanovski, March 2016, MK.NET UG
Bojan Veljanovski
 
PPTX
Single Page Apps
Mike (Michael) Acord
 
PPTX
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
PPTX
Building Ext JS Using HATEOAS - Jeff Stano
Sencha
 
SoCal Code Camp 2011 - ASP.NET 4.5
Jon Galloway
 
Rest assured
Yaniv Rodenski
 
Basic method for Java EE Web Profile
Kenji HASUNUMA
 
MSDN Sessions 032817 - Azure Functions
Marc Obaldo
 
Web applications
Peter Berezny
 
Single Page Apps
Max Claus Nunes
 
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
Sencha
 
Single Page Applications on JavaScript and ASP.NET MVC4
Yuriy Shapovalov
 
Progressive Web Apps
Kranthi Lakum
 
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Mazenetsolution
 
Road Trip To Component
Marketa Adamova
 
Single page webapplications
Ronald Harmsen
 
Client side vs server side
abgjim96
 
Em presentation victor herman
Victor Herman
 
APIdays San Francisco, 06/22/2013
Jerome Louvel
 
Asp.net
KIRTI PRADHAN
 
Vertical Slices in .NET - Bojan Veljanovski, March 2016, MK.NET UG
Bojan Veljanovski
 
Single Page Apps
Mike (Michael) Acord
 
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
Building Ext JS Using HATEOAS - Jeff Stano
Sencha
 

Viewers also liked (6)

PDF
Responsive Design
David Hudson
 
PDF
Introduction to jQuery Mobile
David Hudson
 
PPTX
Tech Talks - Fundamentos JavaScript
BVision
 
PDF
Intro to Mobile Web Development with ColdFusion
Matthew Reinbold
 
PPT
WEB 2.0: BUILDING RICH INTERNET APPLICATIONS WITH PHP
zend
 
PDF
Flash, Flex & AIR: A brief survey
Travis Isaacs
 
Responsive Design
David Hudson
 
Introduction to jQuery Mobile
David Hudson
 
Tech Talks - Fundamentos JavaScript
BVision
 
Intro to Mobile Web Development with ColdFusion
Matthew Reinbold
 
WEB 2.0: BUILDING RICH INTERNET APPLICATIONS WITH PHP
zend
 
Flash, Flex & AIR: A brief survey
Travis Isaacs
 
Ad

Similar to Single page applications with backbone js (20)

PPTX
Web Development Today
bretticus
 
PPTX
Angular jS Introduction by Google
ASG
 
PPTX
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
PDF
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
PPTX
Single page application and Framework
Chandrasekar G
 
PPT
Webapplication ppt prepared by krishna ballabh gupta
Shivalik college of engineering
 
PPTX
Introduction to ASP.NET
Rajkumarsoy
 
PPTX
Web API or WCF - An Architectural Comparison
Adnan Masood
 
PPTX
ASP.net MVC Introduction Wikilogia (nov 2014)
Hatem Hamad
 
PPTX
ASP.NET Presentation
Rasel Khan
 
DOCX
Top 10 Javascript Frameworks For Easy Web Development
Technostacks Infotech Pvt. Ltd.
 
PPSX
Web development concepts using microsoft technologies
Hosam Kamel
 
PPTX
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Taiseer Joudeh
 
PPT
Ppt for Online music store
ADEEBANADEEM
 
PPTX
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
PPT
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
PPTX
WebNetConf 2012 - Single Page Apps
Pop Apps
 
PPTX
Angular js presentation at Datacom
David Xi Peng Yang
 
PPT
A Microsoft primer for PHP devs
guest0a62e8
 
PPT
DevNext - Web Programming Concepts Using Asp Net
Adil Mughal
 
Web Development Today
bretticus
 
Angular jS Introduction by Google
ASG
 
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
Single page application and Framework
Chandrasekar G
 
Webapplication ppt prepared by krishna ballabh gupta
Shivalik college of engineering
 
Introduction to ASP.NET
Rajkumarsoy
 
Web API or WCF - An Architectural Comparison
Adnan Masood
 
ASP.net MVC Introduction Wikilogia (nov 2014)
Hatem Hamad
 
ASP.NET Presentation
Rasel Khan
 
Top 10 Javascript Frameworks For Easy Web Development
Technostacks Infotech Pvt. Ltd.
 
Web development concepts using microsoft technologies
Hosam Kamel
 
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Taiseer Joudeh
 
Ppt for Online music store
ADEEBANADEEM
 
Building SPA’s (Single Page App) with Backbone.js
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
WebNetConf 2012 - Single Page Apps
Pop Apps
 
Angular js presentation at Datacom
David Xi Peng Yang
 
A Microsoft primer for PHP devs
guest0a62e8
 
DevNext - Web Programming Concepts Using Asp Net
Adil Mughal
 
Ad

More from Gil Fink (20)

PDF
Becoming a Tech Speaker
Gil Fink
 
PPTX
Web animation on steroids web animation api
Gil Fink
 
PDF
The Time for Vanilla Web Components has Arrived
Gil Fink
 
PDF
Stencil the time for vanilla web components has arrived
Gil Fink
 
PDF
Stencil the time for vanilla web components has arrived
Gil Fink
 
PDF
Stencil: The Time for Vanilla Web Components has Arrived
Gil Fink
 
PDF
Stencil the time for vanilla web components has arrived
Gil Fink
 
PDF
Being a tech speaker
Gil Fink
 
PDF
Working with Data in Service Workers
Gil Fink
 
PDF
Demystifying Angular Animations
Gil Fink
 
PDF
Redux data flow with angular
Gil Fink
 
PDF
Redux data flow with angular
Gil Fink
 
PDF
Who's afraid of front end databases?
Gil Fink
 
PDF
One language to rule them all type script
Gil Fink
 
PDF
End to-end apps with type script
Gil Fink
 
PDF
Web component driven development
Gil Fink
 
PDF
Web components
Gil Fink
 
PDF
Redux data flow with angular 2
Gil Fink
 
PDF
Biological Modeling, Powered by AngularJS
Gil Fink
 
PDF
Who's afraid of front end databases
Gil Fink
 
Becoming a Tech Speaker
Gil Fink
 
Web animation on steroids web animation api
Gil Fink
 
The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Gil Fink
 
Stencil: The Time for Vanilla Web Components has Arrived
Gil Fink
 
Stencil the time for vanilla web components has arrived
Gil Fink
 
Being a tech speaker
Gil Fink
 
Working with Data in Service Workers
Gil Fink
 
Demystifying Angular Animations
Gil Fink
 
Redux data flow with angular
Gil Fink
 
Redux data flow with angular
Gil Fink
 
Who's afraid of front end databases?
Gil Fink
 
One language to rule them all type script
Gil Fink
 
End to-end apps with type script
Gil Fink
 
Web component driven development
Gil Fink
 
Web components
Gil Fink
 
Redux data flow with angular 2
Gil Fink
 
Biological Modeling, Powered by AngularJS
Gil Fink
 
Who's afraid of front end databases
Gil Fink
 

Recently uploaded (20)

PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Python basic programing language for automation
DanialHabibi2
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 

Single page applications with backbone js

  • 1. SELA DEVELOPER PRACTICE Gil Fink Single Page Applications with Backbone.js
  • 2. • The Road to Single Page Apps • What is a SPA? • SPA Building Blocks and Architecture • AMD and RequireJS • MVC using Backbone.js • A Simple SPA Agenda
  • 3. RIA Web Apps Websites Thin Clients and App Stores The Road to Single Page Apps Native Apps Click- Once SPA Embedded Objects (Flash, Silverlight, Java Applets …)
  • 4. Traditional Web Apps HTTP requests translated into user actions The state persisted in the server side The server translates the user action The server translates its response to HTML The browser displays the HTML response
  • 5. Traditional Native Apps State is persisted in the client-side Compiled programming language is used The application is platform dependent An installation may be required
  • 6. What is a Single Page App (SPA)? A web application No need for full page submit No full refresh No embedded objects Client-side routing
  • 7. Why to Develop SPAs? Feature Web App Native App Single Page App Cross Platform V X V Client State Management X V V No Installation required V X V Web App Native App SPA
  • 8. SPA Building Blocks HTML5 JavaScript Libraries Ajax REST SPA Web API
  • 9. HTML5 Supported by most modern browsers Include variety of new JavaScript APIs that can help to: Store data locally Save data across application shutdowns Communicate with the server in new ways Such as CORS and Web Sockets Increase web performance with new APIs and new mechanisms
  • 10. Ajax Asynchronously call server endpoints Non blocking operations You can maintain state in the client and go to the server without refreshing the whole page Has opened the road for richer client-side UX
  • 12. REST Stands for REpresntational State Transfer Architecture style Designed to work with HTTP Using HTTP verbs (POST, GET, PUT, DELETE) Performs Create, Read, Update and Delete operations respectively Can also use other HTTP verbs Can receive and send data in variety of formats JSON, XML, HTML, XHTML, Blob and more
  • 13. Web API The server is used only as API Each API Function is an endpoint in the server No need for server rendering No need for server routing
  • 14. Client-Side Routing The main building block in a SPA All routing is done in the client-side You use a routing library/framework When a route change happens, the library/framework intercepts the navigation and impose your functionality
  • 16. Asynchronous Module Definitions (AMD) Define modules such that the module and its dependencies can be asynchronously loaded
  • 17. RequireJS Library A module framework in the browser Can be downloaded from http://requirejs.org/ Browser friendly API Concepts supported in Node.js as well Defines a structure for files layout Uses conventions to perform lookups for dependencies
  • 19. MVC using Backbone.js Backbone.js is a small MVW library Enforces structure to your JavaScript code Includes only 5 main objects: Models Collections Views Routers Events
  • 20. MVC using Backbone.js – Cont. Extending one of Backbone.js main objects To include built-in Backbone.js functionality To create your own custom functionality var myModel = Backbone.Model.extend({ defaults: { myModelID: 0, myModelName: ‘’ } }); Var myCollection = Backbone.Collection.extend({ model: myModel }); var myRouter = Backbone.Router.extend({ routes: { ‘’: home }, home: function() { // create the home view } });
  • 23. Summary • SPAs are entire web apps built upon one page and JavaScript interactions • Very suitable for mobile development • SPAs are the way to build your next web apps!