SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
Single Page Web
Application
KEY QUESTIONS
1
2
What are
the key questions
when developing an SPA?
What are
the key questions
when developing an SPA?
What’s an SPA?
1. A page is not completely reloaded
2. HTML is generated by client side JS
3. Client side state is stored with JS objects
3
Web
Page
SPA
Complexity
Low
High
.NET Web Evolution
3 GENERATION OF ASP.NET APPLICATIONS
4
.NET Web: Generation #1
ASP.NET Web Forms / 2002 – Now
5
Page
Web Form Code Behind
Life Cycle
ClientServer
No special
JS
structuring
GET / POST
.NET Web: Generation #2
ASP.NET MVC / 2009 – Now
6
Page
Controller
ClientServer
Primitive
JS
structuring
GET / POST
.NET Web: Generation #3
ASP.NET Web API / 2012 – Now
7
Page
REST API
ClientServer
Strong
JS
structuring
Mobile App
GET / POST / PUT / DELETE
The Key Questions
8
1. Base JS “Bricks”
1.1. WHAT IS A MINIMAL STRUCTURAL UNIT?
1.2. HOW TO MANAGE DEPENDENCIES AMONG UNITS?
9
JS Module Pattern
10
Provides both private and public
encapsulation for classes
The Module Pattern (by Addy Osmani)
JS Module Example
11
▪ Closure is used for
private state
▪ “Public” object is
returned
▪ Created by IIFE
JS Module Dependencies
12
JS Module Extending
13
Pseudo Class
as a JS Module
14
Backbone collection
as a JS Module
15
JS Module Standards: AMD
16
define(id?, dependencies?, factory)
AMD Specification (on Git Hub)
Writing Modular JavaScript With AMD, CommonJS & ES Harmony (by Addy Osmani)
JS Module Quality Criterion
17
How easily could a JS Module be covered
by UNIT TESTS?
2. Frameworks
2.1. WHAT IS A STACK OF BASE FRAMEWORKS?
18
Criteria to Frameworks Stack
1. Extending of base JS functions
2. DOM processing
3. HTML templates
4. AJAX / REST handling
5. MV*
6. Routing
7. JS Modules management
19
Top JS MV* Frameworks
20
Knockout.js
Ember.js
Angular.js
Backbone.js
Sample of Frameworks Stack
21
Backbone.js
Underscore.js
jQuery Require.js
3. Architecture
3.1. HOW TO STRUCTURE GUI?
3.2. HOW TO KEEP DATA?
3.3. HOW TO PUT THINGS TOGETHER?
22
Web Module
1. Works independently from other web modules
2. Works within the “sandbox”
3. Has limited knowledge regarding the whole application
4. Is managed by a web module manager
23
Scalable JavaScript Application Architecture (by Nicholas Zakas)
Web Module = HTML + CSS + JS
Web Modules: Base Idea
24
Web Module 1 Web Module 2
Web Modules Manager
 Manages a web module
life cycle
 Manages collaboration
among modules
Web Module Context
 Everything a web
module knows about
the application
 Manage user’s
interaction
 Don’t know about
each other
Web Module
↓
an independent
part of GUI
Web Modules:
Hierarchical Implementation
25
Root Web Module
Web Module 1
Web Module 1-1 Web Module 1-2
Application
Web Module 2
Web Module 2-1 Web Module 2-2
Parent & Child Web Modules
26
Parent
Child
Communication between parent and child
Child'slife cycle management
1: Register(context, eventHandlers)
3: Invoke a child'smethod()
2: Unregister()
4: Raise an event()
Web Module: Quality Criterion
27
How much is a web module depended from
the other web modules?
Data Aggregate
28
Customer Order
Item
REST API
Web Module 1 Web Module 2
29
Thank You!
30

Mais conteúdo relacionado

Mais procurados

Java Script from Browser to Server
Java Script from Browser to ServerJava Script from Browser to Server
Java Script from Browser to Server
WSO2
 
Javascript(2)
Javascript(2)Javascript(2)
Javascript(2)
tomcoh
 

Mais procurados (11)

Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Java Script from Browser to Server
Java Script from Browser to ServerJava Script from Browser to Server
Java Script from Browser to Server
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Javascript(2)
Javascript(2)Javascript(2)
Javascript(2)
 
Midgard Create and VIE
Midgard Create and VIEMidgard Create and VIE
Midgard Create and VIE
 
Intro to Powershell
Intro to PowershellIntro to Powershell
Intro to Powershell
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Less & RequireJS - Frontend Development in Magento 2
Less & RequireJS - Frontend Development in Magento 2Less & RequireJS - Frontend Development in Magento 2
Less & RequireJS - Frontend Development in Magento 2
 
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
 
VIE - Using RDFa to make content editable
VIE - Using RDFa to make content editableVIE - Using RDFa to make content editable
VIE - Using RDFa to make content editable
 
Pros and cons of vue.js
Pros and cons of vue.jsPros and cons of vue.js
Pros and cons of vue.js
 

Destaque

Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application Architecture
Eray Arslan
 

Destaque (20)

Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application Architecture
 
Single page application
Single page applicationSingle page application
Single page application
 
Single Page Application
Single Page ApplicationSingle Page Application
Single Page Application
 
single page application
single page applicationsingle page application
single page application
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
 
The Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cliThe Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cli
 
Rits Brown Bag - TypeScript
Rits Brown Bag - TypeScriptRits Brown Bag - TypeScript
Rits Brown Bag - TypeScript
 
Angular 2 + TypeScript = true. Let's Play!
Angular 2 + TypeScript = true. Let's Play!Angular 2 + TypeScript = true. Let's Play!
Angular 2 + TypeScript = true. Let's Play!
 
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 MinutesUsing Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
 
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
 
Single page application
Single page applicationSingle page application
Single page application
 
Angular 1.x vs 2 - In code level
Angular 1.x vs 2 - In code levelAngular 1.x vs 2 - In code level
Angular 1.x vs 2 - In code level
 
Getting started with Angular CLI
Getting started with Angular CLIGetting started with Angular CLI
Getting started with Angular CLI
 
Getting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIGetting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLI
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
 
Node js
Node jsNode js
Node js
 

Semelhante a SPA: Key Questions

SharePoint Web part programming
SharePoint Web part programmingSharePoint Web part programming
SharePoint Web part programming
Quang Nguyễn Bá
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentation
MaslowB
 

Semelhante a SPA: Key Questions (20)

Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
SharePoint Web part programming
SharePoint Web part programmingSharePoint Web part programming
SharePoint Web part programming
 
Modern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design PatternsModern JavaScript Applications: Design Patterns
Modern JavaScript Applications: Design Patterns
 
Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)Going offline with JS (DDD Sydney)
Going offline with JS (DDD Sydney)
 
SGCE 2012 Lightning Talk-Single Page Interface
SGCE 2012 Lightning Talk-Single Page InterfaceSGCE 2012 Lightning Talk-Single Page Interface
SGCE 2012 Lightning Talk-Single Page Interface
 
React js Introduction
React js IntroductionReact js Introduction
React js Introduction
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|
 
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
 
Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)
 
FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JS
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satya
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satya
 
Struts notes
Struts notesStruts notes
Struts notes
 
Dot net syllabus book
Dot net syllabus bookDot net syllabus book
Dot net syllabus book
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentation
 
Going Offline with JS
Going Offline with JSGoing Offline with JS
Going Offline with JS
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

SPA: Key Questions