SlideShare a Scribd company logo
1 of 39
Single Page Applications (SPA)
Jeremy Likness
Principal Architect
@JeremyLikness
Our Mission, Vision, and Values
Our Solutions
INDUSTRIES WE WORK WITH
OUR AWARDS
TODAY’S AGENDA
1. Why? Drivers behind adoption of SPA applications
2. What? Features that Make up a Single Page App
3. How? Frameworks make building apps easier
4. Q&A You have questions, we have answers
WHY?
Why? A Brief History (Pt. 1)
1995
• Complete pages are loaded from the server
• Pages disappear, then reappear
1996
• Internet Explorer introduces the IFRAME
• Dozens of websites adopt this ugly hack
1998
• Microsoft Outlook Web App introduces the XMLHTTP component
1999
• XMLHTTP elevated to ActiveX status
• Mozilla, Safari, Operate implement XMLHttpRequest
2004
• Another web-based email app, GMail, pushes the envelope
• The Ajax standard is born. Work on HTML5 begins (yeah, really!)
2006
• W3C standardizes XMLHttpRequest
Why? (A Brief History Pt. 2)
2006
• jQuery normalizes the DOM
• Developers suddenly have a lot more free time
2007
• Silverlight released
• Microsoft successfully distracts developers away from building SPA apps
2009
• First version of AngularJS is released
2010
• Silverlight 5 is released. It is almost immediately killed
• KnockoutJS is released. BackboneJS is released a few months later
2011
• Last call for HTML5 specification
• EmberJS is released
2015
• It’s simple. “We want to access any app, from anywhere, on any device.”
And you’re responsible to make it happen!
DEMO: Before SPA
Disadvantages
UX Reload Real-time
Server
Load
Network
Load
Mobile
The Experience
UX
• Lacks responsiveness (click and wait)
• Page abandonment
• Amazon: 100ms slower = 1% lost revenue
• Google: 500ms slower = 20% decreased traffic
• Lots of manual effort, limited “one-click” experience
• Real-time notifications and updates are difficult
Reloading and Round-Trips
Reload
• Server logic is often convoluted when trying to pull data from
various areas to aggregate in order to render
• Must remember state and re-render state each time (as
opposed to state being preserved in the client)
• Flicker/page freeze is disruptive
Support for Real-time
Real-time
• Only practical method without SPA is to POST on a timer
• Notifications require rebuilding the entire page
Server and Scalability
Server
Load
• Server must aggregate data from multiple places
• Server now has to process everything again or resort to exotic
cache methods to avoid re-processing on refresh
• Server is responsible for the logic of taking data and
transforming it into presentation, so 1000 clients = 1000x CPU-
bound logic on the server
Chattiness on the Network
Network
Load
Vs.
Mobile-Friendliness
Mobile
• Requires lighter payloads
• Needs simplified model
• Less processing (but less rendering is needed)
• Less data when going over metered networks
Challenges
DOM
Standards
Routing Security
Modularity Testing Development
WHAT?
What? Typical SPA Features
Data Binding
Views /
Components
Routing
Dependency
Injection
Data
Services
Testing
Data-Binding Support
Data-
Binding
• Separate presentation logic from actual presentation
• For example: “button click” vs. “my action” that can then be
bound to a button, hyperlink, or other action
• Validation
• Data transformation
• Leads to testability and scale
• “Designer/developer workflow”
Don’t Repeat Yourself!
Views /
Components
• Support for rendering to a part of the page
• Reusable data transformations (i.e. filters, value converters)
• Reusable components (i.e. grids, type-ahead, dialog boxes, etc.)
• HTML5 standards (Web Components)
• Responsive
• Master/detail side-by-side on desktop
• Master/detail separate pages on mobile
It’s Still the Browser!
Routing
• Navigation: I can browse to an area of the application
• Bookmarks: I can save the hyperlink to a useful piece of
information or workflow that I am a part of
• State: I can persist my state between areas of the application
• Journal: I can use the back and forward buttons on my browser
the way I’m used to
Managing Large Code Bases
Dependency
Injection
• Loosely couple JavaScript objects
• Separation of concerns enables parallel development
• Inversion of control enables testability and promotes reusability
• Service location makes it easier to develop components with
dependencies
Would You Rather This …
Data
Services
… Or This?
Data
Services
Given SPA When Test Then OK!
Testing
• Many frameworks come with their own test suites
• Some have specific support for testing and mocking interfaces
• All should expose a straightforward means to test
• Best frameworks don’t require a dependency on a visible
browser
HOW?
http://jquery.com/
• “Normalize the DOM”
• Most popular JavaScript library in use
• One of the longest maintained frameworks
• Many SPA frameworks can layer on top of this
• DEMO: http://todomvc.com/examples/jquery/#/all
• Source: https://github.com/tastejs/todomvc/blob/gh-
pages/examples/jquery/js/app.js
http://www.typescriptlang.org/
• Fooled you, this isn’t a SPA framework
• Works well with many existing SPA frameworks
• Helps “tame” JavaScript
• Very useful for projects with scale (lots of code and/or many developers)
• Page: https://github.com/tastejs/todomvc/blob/gh-
pages/examples/typescript-angular/index.html
• Source: https://github.com/tastejs/todomvc/tree/gh-
pages/examples/typescript-angular/js
http://knockoutjs.com/
• Introduced in early MVC templates by Microsoft
• Declarative bindings
• Automatic refresh of UI
• Relationships and computed models
• Templates
• Page: https://github.com/tastejs/todomvc/blob/gh-
pages/examples/knockoutjs/index.html
• Source: https://github.com/tastejs/todomvc/blob/gh-
pages/examples/knockoutjs/js/app.js
http://backbonejs.org/
• Model-driven
• Idea of “entities” and “collections”
• Views
• Convention-based REST interface
• Page: https://github.com/tastejs/todomvc/blob/gh-
pages/examples/backbone/index.html
• Source: https://github.com/tastejs/todomvc/tree/gh-
pages/examples/backbone/js
http://emberjs.com/
• Focused on productivity
• Handlebar templates
• Common idioms / convention based
• Page: https://github.com/tastejs/todomvc/blob/gh-
pages/examples/emberjs/index.html
• Source: https://github.com/tastejs/todomvc/tree/gh-
pages/examples/emberjs/js
https://angularjs.org/
• Teach HTML New Tricks
• Extensible
• Dependency injection out of the box
• My favorite framework to use, especially on large projects
• Page: https://github.com/tastejs/todomvc/blob/gh-
pages/examples/angularjs/index.html
• Source: https://github.com/tastejs/todomvc/tree/gh-
pages/examples/angularjs/js
http://www.telerik.com/kendo-ui
• Web and Mobile
• HTML5 and JavaScript focused
• Layered on top of jQuery
• Adapters for AngularJS and BackboneJS “out of the box”
• Page: http://kendotodo.apphb.com/Home/Batch
Angular 2.0
• Embraces ECMAScript 6
• Built on TypeScript
• Example: https://github.com/Microsoft/ngconf2015demo
• Page:
https://github.com/Microsoft/ngconf2015demo/blob/master/todo.html
• Source:
https://github.com/Microsoft/ngconf2015demo/blob/master/todo.ts
http://aurelia.io/
• Convention-based
• Built for ECMAScript 6 from the ground up
• Former member of AngularJS 2.0 team
• Examples: http://aurelia.io/get-started.html
DEMO: Todo SPA
Questions?
• Demo Code: https://github.com/JeremyLikness/SPAAppsExplained
• A Different Angle: What is AngularJS?
http://csharperimage.jeremylikness.com/2014/10/a-different-
angle-what-is-angularjs.html
• Let’s Build an AngularJS App!
http://csharperimage.jeremylikness.com/2014/10/lets-build-
angularjs-app.html
• iVision Application Development:
http://ivision.com/our-services/technology-services/application-
development/
Jeremy Likness, Principal Architect @JeremyLikness

More Related Content

What's hot

Sencha and Spring (Spring 2GX 2013)
Sencha and Spring (Spring 2GX 2013) Sencha and Spring (Spring 2GX 2013)
Sencha and Spring (Spring 2GX 2013) Sencha
 
Jasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptJasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptSumanth krishna
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdevdamianofusco
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Herman Peeren
 
Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using ProtractorAnand Bagmar
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC eldorina
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynotedmethvin
 
Aspect oriented programming
Aspect oriented programmingAspect oriented programming
Aspect oriented programmingRobert MacLean
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Thomas Robbins
 
OSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon KaegiOSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon Kaegimfrancis
 
Fast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCFast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCAnkit Kashyap
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsSauce Labs
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 dayQuach Long
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptTroy Miles
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Noam Kfir
 
Develop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val KarpovDevelop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val KarpovMongoDB
 

What's hot (20)

Sencha and Spring (Spring 2GX 2013)
Sencha and Spring (Spring 2GX 2013) Sencha and Spring (Spring 2GX 2013)
Sencha and Spring (Spring 2GX 2013)
 
Jasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScriptJasmine - A BDD test framework for JavaScript
Jasmine - A BDD test framework for JavaScript
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdev
 
Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.Webservices: connecting Joomla! with other programs.
Webservices: connecting Joomla! with other programs.
 
Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using Protractor
 
ASP .NET MVC
ASP .NET MVC ASP .NET MVC
ASP .NET MVC
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPages
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
 
Backbonemeetup
BackbonemeetupBackbonemeetup
Backbonemeetup
 
Aspect oriented programming
Aspect oriented programmingAspect oriented programming
Aspect oriented programming
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
OSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon KaegiOSGi and JavaScript - Simon Kaegi
OSGi and JavaScript - Simon Kaegi
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
 
Fast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCFast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVC
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 day
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6Angular on ASP.NET MVC 6
Angular on ASP.NET MVC 6
 
Develop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val KarpovDevelop a Basic REST API from Scratch Using TDD with Val Karpov
Develop a Basic REST API from Scratch Using TDD with Val Karpov
 
MSDN - ASP.NET MVC
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVC
 

Viewers also liked

Angular from a Different Angle
Angular from a Different AngleAngular from a Different Angle
Angular from a Different AngleJeremy Likness
 
Let's Build an Angular App!
Let's Build an Angular App!Let's Build an Angular App!
Let's Build an Angular App!Jeremy Likness
 
Angle Forward with TypeScript
Angle Forward with TypeScriptAngle Forward with TypeScript
Angle Forward with TypeScriptJeremy Likness
 
C# Async/Await Explained
C# Async/Await ExplainedC# Async/Await Explained
C# Async/Await ExplainedJeremy Likness
 
Back to the ng2 Future
Back to the ng2 FutureBack to the ng2 Future
Back to the ng2 FutureJeremy Likness
 
Cross-Platform Agile DevOps with Visual Studio Team Services
Cross-Platform Agile DevOps with Visual Studio Team ServicesCross-Platform Agile DevOps with Visual Studio Team Services
Cross-Platform Agile DevOps with Visual Studio Team ServicesJeremy Likness
 

Viewers also liked (7)

Angular from a Different Angle
Angular from a Different AngleAngular from a Different Angle
Angular from a Different Angle
 
Let's Build an Angular App!
Let's Build an Angular App!Let's Build an Angular App!
Let's Build an Angular App!
 
Angle Forward with TypeScript
Angle Forward with TypeScriptAngle Forward with TypeScript
Angle Forward with TypeScript
 
C# Async/Await Explained
C# Async/Await ExplainedC# Async/Await Explained
C# Async/Await Explained
 
Windows 8.1 Sockets
Windows 8.1 SocketsWindows 8.1 Sockets
Windows 8.1 Sockets
 
Back to the ng2 Future
Back to the ng2 FutureBack to the ng2 Future
Back to the ng2 Future
 
Cross-Platform Agile DevOps with Visual Studio Team Services
Cross-Platform Agile DevOps with Visual Studio Team ServicesCross-Platform Agile DevOps with Visual Studio Team Services
Cross-Platform Agile DevOps with Visual Studio Team Services
 

Similar to Single Page Applications: Your Browser is the OS!

Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Sean McCullough
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuningJohn McCaffrey
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamAndreas Grabner
 
All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive uiPaul van Zyl
 
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...Tieturi Oy
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentationMaslowB
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Derek Ashmore
 
Tech Talk on Cloud Computing
Tech Talk on Cloud ComputingTech Talk on Cloud Computing
Tech Talk on Cloud ComputingITviec
 
Mobile gotcha
Mobile gotchaMobile gotcha
Mobile gotchaphegaro
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)TIMETOACT GROUP
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Timothy Fisher
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples Yochay Kiriaty
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesTeamstudio
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Theo Jungeblut
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”EPAM Systems
 

Similar to Single Page Applications: Your Browser is the OS! (20)

Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014
 
Cvcc performance tuning
Cvcc performance tuningCvcc performance tuning
Cvcc performance tuning
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
 
All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive ui
 
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
 
Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentation
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15
 
Tech Talk on Cloud Computing
Tech Talk on Cloud ComputingTech Talk on Cloud Computing
Tech Talk on Cloud Computing
 
Mobile gotcha
Mobile gotchaMobile gotcha
Mobile gotcha
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011Developing High Performance Web Apps - CodeMash 2011
Developing High Performance Web Apps - CodeMash 2011
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best Practices
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
 

Recently uploaded

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Single Page Applications: Your Browser is the OS!

  • 1. Single Page Applications (SPA) Jeremy Likness Principal Architect @JeremyLikness
  • 2. Our Mission, Vision, and Values
  • 6. TODAY’S AGENDA 1. Why? Drivers behind adoption of SPA applications 2. What? Features that Make up a Single Page App 3. How? Frameworks make building apps easier 4. Q&A You have questions, we have answers
  • 8. Why? A Brief History (Pt. 1) 1995 • Complete pages are loaded from the server • Pages disappear, then reappear 1996 • Internet Explorer introduces the IFRAME • Dozens of websites adopt this ugly hack 1998 • Microsoft Outlook Web App introduces the XMLHTTP component 1999 • XMLHTTP elevated to ActiveX status • Mozilla, Safari, Operate implement XMLHttpRequest 2004 • Another web-based email app, GMail, pushes the envelope • The Ajax standard is born. Work on HTML5 begins (yeah, really!) 2006 • W3C standardizes XMLHttpRequest
  • 9. Why? (A Brief History Pt. 2) 2006 • jQuery normalizes the DOM • Developers suddenly have a lot more free time 2007 • Silverlight released • Microsoft successfully distracts developers away from building SPA apps 2009 • First version of AngularJS is released 2010 • Silverlight 5 is released. It is almost immediately killed • KnockoutJS is released. BackboneJS is released a few months later 2011 • Last call for HTML5 specification • EmberJS is released 2015 • It’s simple. “We want to access any app, from anywhere, on any device.” And you’re responsible to make it happen!
  • 12. The Experience UX • Lacks responsiveness (click and wait) • Page abandonment • Amazon: 100ms slower = 1% lost revenue • Google: 500ms slower = 20% decreased traffic • Lots of manual effort, limited “one-click” experience • Real-time notifications and updates are difficult
  • 13. Reloading and Round-Trips Reload • Server logic is often convoluted when trying to pull data from various areas to aggregate in order to render • Must remember state and re-render state each time (as opposed to state being preserved in the client) • Flicker/page freeze is disruptive
  • 14. Support for Real-time Real-time • Only practical method without SPA is to POST on a timer • Notifications require rebuilding the entire page
  • 15. Server and Scalability Server Load • Server must aggregate data from multiple places • Server now has to process everything again or resort to exotic cache methods to avoid re-processing on refresh • Server is responsible for the logic of taking data and transforming it into presentation, so 1000 clients = 1000x CPU- bound logic on the server
  • 16. Chattiness on the Network Network Load Vs.
  • 17. Mobile-Friendliness Mobile • Requires lighter payloads • Needs simplified model • Less processing (but less rendering is needed) • Less data when going over metered networks
  • 19. WHAT?
  • 20. What? Typical SPA Features Data Binding Views / Components Routing Dependency Injection Data Services Testing
  • 21. Data-Binding Support Data- Binding • Separate presentation logic from actual presentation • For example: “button click” vs. “my action” that can then be bound to a button, hyperlink, or other action • Validation • Data transformation • Leads to testability and scale • “Designer/developer workflow”
  • 22. Don’t Repeat Yourself! Views / Components • Support for rendering to a part of the page • Reusable data transformations (i.e. filters, value converters) • Reusable components (i.e. grids, type-ahead, dialog boxes, etc.) • HTML5 standards (Web Components) • Responsive • Master/detail side-by-side on desktop • Master/detail separate pages on mobile
  • 23. It’s Still the Browser! Routing • Navigation: I can browse to an area of the application • Bookmarks: I can save the hyperlink to a useful piece of information or workflow that I am a part of • State: I can persist my state between areas of the application • Journal: I can use the back and forward buttons on my browser the way I’m used to
  • 24. Managing Large Code Bases Dependency Injection • Loosely couple JavaScript objects • Separation of concerns enables parallel development • Inversion of control enables testability and promotes reusability • Service location makes it easier to develop components with dependencies
  • 25. Would You Rather This … Data Services
  • 27. Given SPA When Test Then OK! Testing • Many frameworks come with their own test suites • Some have specific support for testing and mocking interfaces • All should expose a straightforward means to test • Best frameworks don’t require a dependency on a visible browser
  • 28. HOW?
  • 29. http://jquery.com/ • “Normalize the DOM” • Most popular JavaScript library in use • One of the longest maintained frameworks • Many SPA frameworks can layer on top of this • DEMO: http://todomvc.com/examples/jquery/#/all • Source: https://github.com/tastejs/todomvc/blob/gh- pages/examples/jquery/js/app.js
  • 30. http://www.typescriptlang.org/ • Fooled you, this isn’t a SPA framework • Works well with many existing SPA frameworks • Helps “tame” JavaScript • Very useful for projects with scale (lots of code and/or many developers) • Page: https://github.com/tastejs/todomvc/blob/gh- pages/examples/typescript-angular/index.html • Source: https://github.com/tastejs/todomvc/tree/gh- pages/examples/typescript-angular/js
  • 31. http://knockoutjs.com/ • Introduced in early MVC templates by Microsoft • Declarative bindings • Automatic refresh of UI • Relationships and computed models • Templates • Page: https://github.com/tastejs/todomvc/blob/gh- pages/examples/knockoutjs/index.html • Source: https://github.com/tastejs/todomvc/blob/gh- pages/examples/knockoutjs/js/app.js
  • 32. http://backbonejs.org/ • Model-driven • Idea of “entities” and “collections” • Views • Convention-based REST interface • Page: https://github.com/tastejs/todomvc/blob/gh- pages/examples/backbone/index.html • Source: https://github.com/tastejs/todomvc/tree/gh- pages/examples/backbone/js
  • 33. http://emberjs.com/ • Focused on productivity • Handlebar templates • Common idioms / convention based • Page: https://github.com/tastejs/todomvc/blob/gh- pages/examples/emberjs/index.html • Source: https://github.com/tastejs/todomvc/tree/gh- pages/examples/emberjs/js
  • 34. https://angularjs.org/ • Teach HTML New Tricks • Extensible • Dependency injection out of the box • My favorite framework to use, especially on large projects • Page: https://github.com/tastejs/todomvc/blob/gh- pages/examples/angularjs/index.html • Source: https://github.com/tastejs/todomvc/tree/gh- pages/examples/angularjs/js
  • 35. http://www.telerik.com/kendo-ui • Web and Mobile • HTML5 and JavaScript focused • Layered on top of jQuery • Adapters for AngularJS and BackboneJS “out of the box” • Page: http://kendotodo.apphb.com/Home/Batch
  • 36. Angular 2.0 • Embraces ECMAScript 6 • Built on TypeScript • Example: https://github.com/Microsoft/ngconf2015demo • Page: https://github.com/Microsoft/ngconf2015demo/blob/master/todo.html • Source: https://github.com/Microsoft/ngconf2015demo/blob/master/todo.ts
  • 37. http://aurelia.io/ • Convention-based • Built for ECMAScript 6 from the ground up • Former member of AngularJS 2.0 team • Examples: http://aurelia.io/get-started.html
  • 39. Questions? • Demo Code: https://github.com/JeremyLikness/SPAAppsExplained • A Different Angle: What is AngularJS? http://csharperimage.jeremylikness.com/2014/10/a-different- angle-what-is-angularjs.html • Let’s Build an AngularJS App! http://csharperimage.jeremylikness.com/2014/10/lets-build- angularjs-app.html • iVision Application Development: http://ivision.com/our-services/technology-services/application- development/ Jeremy Likness, Principal Architect @JeremyLikness

Editor's Notes

  1. Kohavi and Longobtham 2007 – Amazon.com Linden 2006 – Google.com Rest are google
  2. Kohavi and Longobtham 2007 – Amazon.com Linden 2006 – Google.com Rest are google