SlideShare a Scribd company logo
Canopy walk through
Single-Page Apps (SPAs)
Benjamin Howarth
What is a single-page app?
•
•
•
•
•

Single HTML file
Responsive CSS
Javascript “modules”
Underlying API
Tend to follow Model-View-ViewModel (MVVM) pattern
Examples of SPAs
Why SPA?
• Consistent user experience across
desktop, mobile & tablet

• Partially-connected client
functionality

• In short, data-rich apps across a
modern, diverse web platform
Why not SPA?
• http://forums.asp.net/t/1891892.aspx/1?W
hen+not+to+SPA+

“One example would be a web site. Lots of
static data for presentation in regions or
areas. This could be done with client side
templating, but then you lose a lot of SEO
too, and web sites are often where SEO is
important. (In contrast, a SPA for a banking
app is not a place you'd want SEO). So there
are 2 examples: web sites and any place you
need SEO badly. There are ways to do SEO
in SPA, but its not a natural fit.”

• My response?
“Twitter”
Canopy view of single-page applications (SPAs)
• Asynchronous Module Definition
• Standard format for dependency injection
What is AMD?
Dependency injection for functional
programming languages
(no, you’re not seeing things)

in Javasript

• Dependencies are loaded into a
constructor function asynchronously

• The constructor is invoked only when all
dependencies have loaded

• The constructor returns an object – your
viewmodel
• KnockoutJS is a Javascript model binder

KnockoutJS
What is it, and why should I care?

• Turns JSON objects into “observables” e.g.
var something = ko.observable(false);
something(true); // changes value, and fires an event

• Binds Javascript objects to HTML templates, making
code reusable, neater, and easier to maintain

• Makes event-driven Javascript data binding supereasy, instead of $(“input”).change(function() { });
everywhere
• N.B. Every time you do this, a kitten dies.
BreezeJS
What is it, and why should I care?

• BreezeJS is LINQ for Web API with
JSON

• Web API returns JSON or ATOMcompatible XML, BreezeJS makes it
queryable in Javascript

• LINQ all the things!
Viewmodel
Bringing your JS together
Node.js isn’t scary compared to this…

RequireJS

(makes it
modular, gives you
dependency injection)

KnockoutJS
(gives you a “stronglytyped” event-driven JS
viewmodel)

BreezeJS

(used by your KO
viewmodel to get data
from the server)
Model

Bringing the server
and client together
One web, one ASP.NET

MVC
controller

Web API
controller

Viewmodel
(Javascript)

View
(HTML)

View
(OData)

View
(HTML)
• Views
•

MVC = MVVM

• Controller

MVC and MVVM working
together

•

MVC
•
•

2) Partial page using AJAX

•

•

1) Full page using MVC
#1 and #2 are done with the same controller

MVVM
•

Requests views using #2

• Model
•

MVC
•
•

•

O/RM of choice
JSON using Web API

MVVM
•

Breeze calling Web API

• Routes
•

Exported to MVVM routing library from MVC via JSON
Thanks for listening!
•
•
•
•

http://www.benjaminhowarth.com
http://www.codegecko.com
http://github.com/codegecko
@benjaminhowarth
Ad

More Related Content

What's hot (20)

Intro to Knockout.JS for Salesforce1
Intro to Knockout.JS for Salesforce1Intro to Knockout.JS for Salesforce1
Intro to Knockout.JS for Salesforce1
Boris Bachovski
 
Ajax and RJS
Ajax and RJSAjax and RJS
Ajax and RJS
Dominiek ter Heide
 
Java script202
Java script202Java script202
Java script202
Wasiq Zia
 
Unobtrusive js
Unobtrusive jsUnobtrusive js
Unobtrusive js
bretticus
 
Visual resume
Visual resumeVisual resume
Visual resume
Milan Skorić
 
Compress
CompressCompress
Compress
cziltang
 
MEAN stack
MEAN stackMEAN stack
MEAN stack
Iryney Baran
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
EventBridge Patterns and real world use case
EventBridge Patterns and real world use caseEventBridge Patterns and real world use case
EventBridge Patterns and real world use case
Jimmy Dahlqvist
 
Session dotNed Saturday 28 januari 2017
Session dotNed Saturday 28 januari 2017Session dotNed Saturday 28 januari 2017
Session dotNed Saturday 28 januari 2017
Gerald Versluis
 
Isomorphic web apps with react
Isomorphic web apps with reactIsomorphic web apps with react
Isomorphic web apps with react
larrymyers717
 
AngularJS - the folly of choice
AngularJS - the folly of choiceAngularJS - the folly of choice
AngularJS - the folly of choice
Oleg Podsechin
 
Welcome to Wijmo 5
Welcome to Wijmo 5Welcome to Wijmo 5
Welcome to Wijmo 5
Chris Bannon
 
Overview of AJAX
Overview of AJAXOverview of AJAX
Overview of AJAX
Roshith S Pai
 
Introduction to the MEAN stack
Introduction to the MEAN stackIntroduction to the MEAN stack
Introduction to the MEAN stack
Yoann Gotthilf
 
WordPress & Backbone.js
WordPress & Backbone.jsWordPress & Backbone.js
WordPress & Backbone.js
Andrew Duthie
 
Introduction to mean stack
Introduction to mean stackIntroduction to mean stack
Introduction to mean stack
Praveen Gubbala
 
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB Days Silicon Valley: Building Applications with the MEAN StackMongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB
 
Angular JS - Wikilogia
Angular JS - WikilogiaAngular JS - Wikilogia
Angular JS - Wikilogia
Mohammed Aljuboori
 
Wheel.js
Wheel.jsWheel.js
Wheel.js
baccigalupi
 
Intro to Knockout.JS for Salesforce1
Intro to Knockout.JS for Salesforce1Intro to Knockout.JS for Salesforce1
Intro to Knockout.JS for Salesforce1
Boris Bachovski
 
Java script202
Java script202Java script202
Java script202
Wasiq Zia
 
Unobtrusive js
Unobtrusive jsUnobtrusive js
Unobtrusive js
bretticus
 
Get MEAN! Node.js and the MEAN stack
Get MEAN!  Node.js and the MEAN stackGet MEAN!  Node.js and the MEAN stack
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
EventBridge Patterns and real world use case
EventBridge Patterns and real world use caseEventBridge Patterns and real world use case
EventBridge Patterns and real world use case
Jimmy Dahlqvist
 
Session dotNed Saturday 28 januari 2017
Session dotNed Saturday 28 januari 2017Session dotNed Saturday 28 januari 2017
Session dotNed Saturday 28 januari 2017
Gerald Versluis
 
Isomorphic web apps with react
Isomorphic web apps with reactIsomorphic web apps with react
Isomorphic web apps with react
larrymyers717
 
AngularJS - the folly of choice
AngularJS - the folly of choiceAngularJS - the folly of choice
AngularJS - the folly of choice
Oleg Podsechin
 
Welcome to Wijmo 5
Welcome to Wijmo 5Welcome to Wijmo 5
Welcome to Wijmo 5
Chris Bannon
 
Introduction to the MEAN stack
Introduction to the MEAN stackIntroduction to the MEAN stack
Introduction to the MEAN stack
Yoann Gotthilf
 
WordPress & Backbone.js
WordPress & Backbone.jsWordPress & Backbone.js
WordPress & Backbone.js
Andrew Duthie
 
Introduction to mean stack
Introduction to mean stackIntroduction to mean stack
Introduction to mean stack
Praveen Gubbala
 
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB Days Silicon Valley: Building Applications with the MEAN StackMongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB
 

Viewers also liked (14)

Single page application 02
Single page application   02Single page application   02
Single page application 02
Ismaeel Enjreny
 
Learningdom online education
Learningdom online educationLearningdom online education
Learningdom online education
learingdoms
 
2554 รวมรางวัลเกียรติยศจากอดีตถึงปี 2554
2554 รวมรางวัลเกียรติยศจากอดีตถึงปี 25542554 รวมรางวัลเกียรติยศจากอดีตถึงปี 2554
2554 รวมรางวัลเกียรติยศจากอดีตถึงปี 2554
Piyarerk Bunkoson
 
cBio Cancer Genomics Portal: Network View
cBio Cancer Genomics Portal:  Network ViewcBio Cancer Genomics Portal:  Network View
cBio Cancer Genomics Portal: Network View
Ethan Cerami
 
PPP for our Canadian penpals
PPP for our Canadian penpalsPPP for our Canadian penpals
PPP for our Canadian penpals
salcgra
 
ChesirePresentation
ChesirePresentationChesirePresentation
ChesirePresentation
Kassandra Chesire
 
Relatório de missões rio grande do sul e santa catarina
Relatório de missões rio grande do sul e santa catarinaRelatório de missões rio grande do sul e santa catarina
Relatório de missões rio grande do sul e santa catarina
Bruno Da Montanha
 
Hello c
Hello cHello c
Hello c
Ashish Ranjan
 
Práctica 3
Práctica 3Práctica 3
Práctica 3
Madanga12345
 
StreetSeen: Factors Influencing the Desirability of a Street for Bicycling
StreetSeen: Factors Influencing the Desirability of a Street for BicyclingStreetSeen: Factors Influencing the Desirability of a Street for Bicycling
StreetSeen: Factors Influencing the Desirability of a Street for Bicycling
Jennifer Evans-Cowley
 
Task 2 - Mood Board
Task 2 - Mood BoardTask 2 - Mood Board
Task 2 - Mood Board
Matt102030
 
Presentation1
Presentation1Presentation1
Presentation1
Frank Hadjam
 
Young people do a lot of things with technology - does that include learning?
Young people do a lot of things with technology - does that include learning?Young people do a lot of things with technology - does that include learning?
Young people do a lot of things with technology - does that include learning?
The Learning and New Technologies Group, Department of Education, Oxford University
 
Chandeleur Les crêpes
Chandeleur  Les crêpesChandeleur  Les crêpes
Chandeleur Les crêpes
Balcon60
 
Single page application 02
Single page application   02Single page application   02
Single page application 02
Ismaeel Enjreny
 
Learningdom online education
Learningdom online educationLearningdom online education
Learningdom online education
learingdoms
 
2554 รวมรางวัลเกียรติยศจากอดีตถึงปี 2554
2554 รวมรางวัลเกียรติยศจากอดีตถึงปี 25542554 รวมรางวัลเกียรติยศจากอดีตถึงปี 2554
2554 รวมรางวัลเกียรติยศจากอดีตถึงปี 2554
Piyarerk Bunkoson
 
cBio Cancer Genomics Portal: Network View
cBio Cancer Genomics Portal:  Network ViewcBio Cancer Genomics Portal:  Network View
cBio Cancer Genomics Portal: Network View
Ethan Cerami
 
PPP for our Canadian penpals
PPP for our Canadian penpalsPPP for our Canadian penpals
PPP for our Canadian penpals
salcgra
 
Relatório de missões rio grande do sul e santa catarina
Relatório de missões rio grande do sul e santa catarinaRelatório de missões rio grande do sul e santa catarina
Relatório de missões rio grande do sul e santa catarina
Bruno Da Montanha
 
StreetSeen: Factors Influencing the Desirability of a Street for Bicycling
StreetSeen: Factors Influencing the Desirability of a Street for BicyclingStreetSeen: Factors Influencing the Desirability of a Street for Bicycling
StreetSeen: Factors Influencing the Desirability of a Street for Bicycling
Jennifer Evans-Cowley
 
Task 2 - Mood Board
Task 2 - Mood BoardTask 2 - Mood Board
Task 2 - Mood Board
Matt102030
 
Chandeleur Les crêpes
Chandeleur  Les crêpesChandeleur  Les crêpes
Chandeleur Les crêpes
Balcon60
 
Ad

Similar to Canopy view of single-page applications (SPAs) (20)

Comparative analysis of java script framework
Comparative analysis of java script frameworkComparative analysis of java script framework
Comparative analysis of java script framework
Nishant Kumar
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
Marc Cyr
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
bretticus
 
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
mearn-stackjdksjdsfjdkofkdokodkojdj.pptxmearn-stackjdksjdsfjdkofkdokodkojdj.pptx
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
Node.js and MongoDB from scratch, fully explained and tested
Node.js and MongoDB from scratch, fully explained and tested Node.js and MongoDB from scratch, fully explained and tested
Node.js and MongoDB from scratch, fully explained and tested
John Culviner
 
Basics of Backbone.js
Basics of Backbone.jsBasics of Backbone.js
Basics of Backbone.js
Avishekh Bharati
 
MVVM Magic in SharePoint 2010 using Knockoutjs!
MVVM Magic in SharePoint 2010 using Knockoutjs!MVVM Magic in SharePoint 2010 using Knockoutjs!
MVVM Magic in SharePoint 2010 using Knockoutjs!
jhendrix88
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
Abhishek Sur
 
Advanced web application architecture Way2Web
Advanced web application architecture Way2WebAdvanced web application architecture Way2Web
Advanced web application architecture Way2Web
Matthias Noback
 
Backbone JS for mobile apps
Backbone JS for mobile appsBackbone JS for mobile apps
Backbone JS for mobile apps
Ivano Malavolta
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdev
damianofusco
 
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScript
Justin Wendlandt
 
A Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsA Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page Applications
Chris Love
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
Kasey McCurdy
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
[2015/2016] Backbone JS
[2015/2016] Backbone JS[2015/2016] Backbone JS
[2015/2016] Backbone JS
Ivano Malavolta
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
Mike McNeil
 
Comparative analysis of java script framework
Comparative analysis of java script frameworkComparative analysis of java script framework
Comparative analysis of java script framework
Nishant Kumar
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
ReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOMReactJS - Re-rendering pages in the age of the mutable DOM
ReactJS - Re-rendering pages in the age of the mutable DOM
Marc Cyr
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
bretticus
 
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
mearn-stackjdksjdsfjdkofkdokodkojdj.pptxmearn-stackjdksjdsfjdkofkdokodkojdj.pptx
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
Node.js and MongoDB from scratch, fully explained and tested
Node.js and MongoDB from scratch, fully explained and tested Node.js and MongoDB from scratch, fully explained and tested
Node.js and MongoDB from scratch, fully explained and tested
John Culviner
 
MVVM Magic in SharePoint 2010 using Knockoutjs!
MVVM Magic in SharePoint 2010 using Knockoutjs!MVVM Magic in SharePoint 2010 using Knockoutjs!
MVVM Magic in SharePoint 2010 using Knockoutjs!
jhendrix88
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
Bluegrass Digital
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
Abhishek Sur
 
Advanced web application architecture Way2Web
Advanced web application architecture Way2WebAdvanced web application architecture Way2Web
Advanced web application architecture Way2Web
Matthias Noback
 
Backbone JS for mobile apps
Backbone JS for mobile appsBackbone JS for mobile apps
Backbone JS for mobile apps
Ivano Malavolta
 
Lightweight webdev
Lightweight webdevLightweight webdev
Lightweight webdev
damianofusco
 
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScript
Justin Wendlandt
 
A Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page ApplicationsA Day Building Fast, Responsive, Extensible Single Page Applications
A Day Building Fast, Responsive, Extensible Single Page Applications
Chris Love
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
Kasey McCurdy
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
Mike McNeil
 
Ad

Recently uploaded (20)

Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 

Canopy view of single-page applications (SPAs)

  • 1. Canopy walk through Single-Page Apps (SPAs) Benjamin Howarth
  • 2. What is a single-page app? • • • • • Single HTML file Responsive CSS Javascript “modules” Underlying API Tend to follow Model-View-ViewModel (MVVM) pattern
  • 4. Why SPA? • Consistent user experience across desktop, mobile & tablet • Partially-connected client functionality • In short, data-rich apps across a modern, diverse web platform
  • 5. Why not SPA? • http://forums.asp.net/t/1891892.aspx/1?W hen+not+to+SPA+ “One example would be a web site. Lots of static data for presentation in regions or areas. This could be done with client side templating, but then you lose a lot of SEO too, and web sites are often where SEO is important. (In contrast, a SPA for a banking app is not a place you'd want SEO). So there are 2 examples: web sites and any place you need SEO badly. There are ways to do SEO in SPA, but its not a natural fit.” • My response? “Twitter”
  • 7. • Asynchronous Module Definition • Standard format for dependency injection What is AMD? Dependency injection for functional programming languages (no, you’re not seeing things) in Javasript • Dependencies are loaded into a constructor function asynchronously • The constructor is invoked only when all dependencies have loaded • The constructor returns an object – your viewmodel
  • 8. • KnockoutJS is a Javascript model binder KnockoutJS What is it, and why should I care? • Turns JSON objects into “observables” e.g. var something = ko.observable(false); something(true); // changes value, and fires an event • Binds Javascript objects to HTML templates, making code reusable, neater, and easier to maintain • Makes event-driven Javascript data binding supereasy, instead of $(“input”).change(function() { }); everywhere • N.B. Every time you do this, a kitten dies.
  • 9. BreezeJS What is it, and why should I care? • BreezeJS is LINQ for Web API with JSON • Web API returns JSON or ATOMcompatible XML, BreezeJS makes it queryable in Javascript • LINQ all the things!
  • 10. Viewmodel Bringing your JS together Node.js isn’t scary compared to this… RequireJS (makes it modular, gives you dependency injection) KnockoutJS (gives you a “stronglytyped” event-driven JS viewmodel) BreezeJS (used by your KO viewmodel to get data from the server)
  • 11. Model Bringing the server and client together One web, one ASP.NET MVC controller Web API controller Viewmodel (Javascript) View (HTML) View (OData) View (HTML)
  • 12. • Views • MVC = MVVM • Controller MVC and MVVM working together • MVC • • 2) Partial page using AJAX • • 1) Full page using MVC #1 and #2 are done with the same controller MVVM • Requests views using #2 • Model • MVC • • • O/RM of choice JSON using Web API MVVM • Breeze calling Web API • Routes • Exported to MVVM routing library from MVC via JSON

Editor's Notes

  • #8: After this, pull up code sample #1