SlideShare une entreprise Scribd logo
1  sur  24
SPA
SINGLE-PAGE
APPLICATION
© 2009 IFS
1
By Isuru Madusanka
© 2009 IFS
2
Traditional Life Cycle Of a Page
GET /?a=1&b=2 HTTP/1.1 musicList.html
HTTP 1.1 200K content html/text
Header + Footer + music List
+ All Images
After refreshing
Whole document
Processing
The requested
document
PROBLEMS OF TRADITIONAL APPROACH
© 2009 IFS
3
CLIENT SIDE:
• A load entire page every time make a request to the server.
• User have to wait until all documents downloaded from the server (HTML + JS+ CSS +
IMAGES).
• After download the content document has to be rendered again from the beginning in the
client device.
• No business logic inside the front end (client-side).
• No MVC model in client side.
• If network lost interaction with application will be terminated.
• No real time update data with server.
© 2009 IFS
3
PROBLEMS OF TRADITIONAL APPROACH
© 2009 IFS
4
SERVER SIDE:
• Have to render page from the beginning for every request made by clients.
• Consume huge network bandwidth unnecessary to upload same whole
documents over and over again.
• Duplication of code in server side.
• Every computations have to done in the server.
• If moving back end to other technology have to rewrite all page rendering
codes ones again from scratch.
SINGLE PAGE APPLICATION IS A WEB APP IN WHICH THE MAJORITY
OF INTERACTION ARE HANDLED ON THE CLIENT WITHOUT THE NEED
TO REACH A SERVER, WITH A GOAL OF PROVIDING A MORE FLUID
USER EXPERIENCE.
© 2009 IFS
5
HOW SPA SOLVE THE PROBLEM?
HIGH LEVEL PICTURE OF SPA
© 2009 IFS
6
Client side
routing
Client side
rendering
SINGLE PAGE
APPLICATION+
© 2009 IFS
7
© 2009 IFS
7
SPA Life Cycle
GET /?a=1&b=2 HTTP/1.1 musicList.html (template)
HTTP 1.1 200K content html/text
Header + Footer + JS app +
CSS
Processing
The requested
document
JS app run and request
Index page
Header + footer + app
Processing
The requested
document
GET /?a=1&b=2 HTTP/1.1 initial page
HTTP 1.1 200K content html/text
Muisc List.html(template)
Header + footer + app + Music List(template)
1
2
© 2009 IFS
8
1 Header + Footer + JS app +
CSS
Header + footer + app + Music List(template)
General Area which
Load template
From the Web app
Music List template
Load from the
Web application
But no data to display
2
© 2009 IFS
9
SPA Life Cycle continue …
JS app run and ask data form server
API getMusicList() render template
From JSON data after received it
Processing
The requested
document
Header + footer + app + Product List(rendered by JSON data)
POST /request HTTP/1.1 Accept:
application/jsonrequest
HTTP 1.1 200K content application/json
{“pId":“iPhone",“price":7500.0,“type":“smart","zip":94089
}
getProductList()
Final output
3
© 2009 IFS
10
Header + footer + app + Product List(rendered by JSON data)3
Now template is full with
Data to view
Powered by
© 2009 IFS
11
Can Load any contain
Without refreshing the
Whole page
Infinite scrolling
Push updates
Rest / JSON API
SERVER ARCHITECTURES FOR SPA
© 2009 IFS
12
• Thin server architecture
• Thick stateful server architecture
• Thick stateless server architecture
HIGH LEVEL PICTURE OF SPA
© 2009 IFS
13
ADVANTAGES OF USING SPA
© 2009 IFS
14
CLIENT SIDE
• “Application like” interaction
• Back/Forward Button works as expected
• More JavaScript than actual HTML
• Ability to go offline
• Dynamic data loading from the server-side API, Works with Restful Web services
• Fluid transitions between page states, Richer Interaction between UI Components.
• Markup, CSS and JS required for the application sent with the initial request
• Page changes occur via JavaScript using Templates and DOM manipulation
• URL hashes are used to track state and provide bookmark able links.
SPA CORE BENEFITS
© 2009 IFS
15
PERFORMANCE IMPROVEMENT
• Load time: 1 file each of HTML, CSS, JS
• Static files not dynamic
• Less data transfer: XHR calls only send
• Raw data, not HTML markup
• Load distribution: Less load on the server by distributing it to clients
• Can use local storage and caching to decrease amount of network traffic.
BUSINESS USAGE OF SPA
© 2009 IFS
16
EXAMPLES
• Create “App-like user experience”
• Bind to your own(or 3rd party) RESTful API
• Build Hybrid(native) HTML5 applications
• Mobile version of your web site
JAVASCRIPT FRAMEWORKS SUPPORT SPA
© 2009 IFS
17
FEATURES SUPPORTED BY SPA FRAMEWORK
© 2009 IFS
18
• Client-Side Templates (Data binding)
• Chunking
• Controllers
• Routing
• Real-time communication
• Local storage
• AJAX
• Data transport (XML, JSON and AJAX)
HYBRID MOBILE APPLICATIONS SPA MOBILE FRAM
© 2009 IFS
19
CLOUD COMPUTING WITH INTEGRATE WITH SPA?
© 2009 IFS
20
SPA application will
deploy in there
WEB OPERATING SYSTEMS EXIST IN TODAY USING
© 2009 IFS
21
FIREFOX OS
Mozilla's attempt to create their own operating
system hence the result is Firefox OS. It's based
on the
Firefox browser and the Gecko rendering
engine. Each app using web technologies
HTML5, CSS3 and
JS and using connect SPA. Those applications
some of reside their user data and application
on the cloud. This more similar to Chrome OS
develop which by Google.
WEB OPERATING SYSTEMS EXIST IN TODAY USING
© 2009 IFS
22
CHROME OS
One of the famous cloud base
operating system ins Google chrome
OS (fork of the chromium OS
project). Google announced Chrome
OS on July 7, 2009 describing as an
operating arrangement in
which both application and user data
reside in the cloud. This OS capable
to deal with cloud applications(SPA)
using SPA. Google also design
special hardware for the run Chrome
OS.
ADVANTAGES AND DISADVANTAGES
© 2009 IFS
23
OF USING SPA CONCEPT
Disadvantage
• Client must enable JavaScript, Single Page
Application build with JavaScript, So
JavaScript should be enabled in client
browser. JavaScript enabled in all modern
browsers by default.
• Security: Compare to traditional page Single
Page Application is less secure due to
Cross-site scripting (XSS).
• Memory Leak: Memory leak in JavaScript
can even cause powerful system to slow
down.
Advantages
• Single Page Application is good for making
Responsive Websites, Support mobile,
Tablet & Desktop.
• No extra queries to the server to download
pages.
• User friendly.
• Performance Improvement, Single Page
Application can improve performance in
many ways, Single time file load each of
HTML, CSS, JS.
www.IFSWORLD.com
© 2009 IFS
24

Contenu connexe

Tendances (20)

Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Introduction à ajax
Introduction à ajaxIntroduction à ajax
Introduction à ajax
 
React js for beginners
React js for beginnersReact js for beginners
React js for beginners
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Spring boot
Spring bootSpring boot
Spring boot
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
reactJS
reactJSreactJS
reactJS
 
Reactjs
Reactjs Reactjs
Reactjs
 
Apache jMeter
Apache jMeterApache jMeter
Apache jMeter
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
React JS
React JSReact JS
React JS
 
소프트웨어 아키텍처
소프트웨어 아키텍처소프트웨어 아키텍처
소프트웨어 아키텍처
 
Reactjs
ReactjsReactjs
Reactjs
 

Similaire à SPA Framework Benefits and Architecture Guide

Evolution of Applications & Web
Evolution of Applications & WebEvolution of Applications & Web
Evolution of Applications & WebHimanshu Jindal
 
Scaling wix.com to 100 million users
Scaling wix.com to 100 million users Scaling wix.com to 100 million users
Scaling wix.com to 100 million users Aviran Mordo
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumSteven Miller
 
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...Jan Jongboom
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
Build Web Applications
Build Web ApplicationsBuild Web Applications
Build Web ApplicationsTom Crombez
 
Building Flash-based websites using Adobe Flex - Lesson 1/10
Building Flash-based websites using Adobe Flex - Lesson 1/10Building Flash-based websites using Adobe Flex - Lesson 1/10
Building Flash-based websites using Adobe Flex - Lesson 1/10Stefano Virgilli
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesAndrew Ferrier
 
Performance and Scalability Art of Isomorphic React Applications
Performance and Scalability Art of Isomorphic React ApplicationsPerformance and Scalability Art of Isomorphic React Applications
Performance and Scalability Art of Isomorphic React ApplicationsDenis Izmaylov
 
Adobe's RIA Technologies (non technical)
Adobe's RIA Technologies (non technical)Adobe's RIA Technologies (non technical)
Adobe's RIA Technologies (non technical)Cyril Hanquez
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )senthil0809
 
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
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat ClientPaul Klipp
 

Similaire à SPA Framework Benefits and Architecture Guide (20)

Webdevelopment
WebdevelopmentWebdevelopment
Webdevelopment
 
Evolution of Applications & Web
Evolution of Applications & WebEvolution of Applications & Web
Evolution of Applications & Web
 
introduction to web application development
introduction to web application developmentintroduction to web application development
introduction to web application development
 
Scaling wix.com to 100 million users
Scaling wix.com to 100 million users Scaling wix.com to 100 million users
Scaling wix.com to 100 million users
 
A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net  A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net
 
Cloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming CurriculumCloud Computing in Systems Programming Curriculum
Cloud Computing in Systems Programming Curriculum
 
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Build Web Applications
Build Web ApplicationsBuild Web Applications
Build Web Applications
 
Building Flash-based websites using Adobe Flex - Lesson 1/10
Building Flash-based websites using Adobe Flex - Lesson 1/10Building Flash-based websites using Adobe Flex - Lesson 1/10
Building Flash-based websites using Adobe Flex - Lesson 1/10
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
 
Performance and Scalability Art of Isomorphic React Applications
Performance and Scalability Art of Isomorphic React ApplicationsPerformance and Scalability Art of Isomorphic React Applications
Performance and Scalability Art of Isomorphic React Applications
 
Adobe's RIA Technologies (non technical)
Adobe's RIA Technologies (non technical)Adobe's RIA Technologies (non technical)
Adobe's RIA Technologies (non technical)
 
AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )AIR - Framework ( Cairngorm and Parsley )
AIR - Framework ( Cairngorm and Parsley )
 
Flex Rails Pres
Flex Rails PresFlex Rails Pres
Flex Rails Pres
 
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 ...
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
 
T2 Web Framework
T2 Web FrameworkT2 Web Framework
T2 Web Framework
 
02 intro
02   intro02   intro
02 intro
 

Dernier

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Dernier (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

SPA Framework Benefits and Architecture Guide

  • 2. © 2009 IFS 2 Traditional Life Cycle Of a Page GET /?a=1&b=2 HTTP/1.1 musicList.html HTTP 1.1 200K content html/text Header + Footer + music List + All Images After refreshing Whole document Processing The requested document
  • 3. PROBLEMS OF TRADITIONAL APPROACH © 2009 IFS 3 CLIENT SIDE: • A load entire page every time make a request to the server. • User have to wait until all documents downloaded from the server (HTML + JS+ CSS + IMAGES). • After download the content document has to be rendered again from the beginning in the client device. • No business logic inside the front end (client-side). • No MVC model in client side. • If network lost interaction with application will be terminated. • No real time update data with server. © 2009 IFS 3
  • 4. PROBLEMS OF TRADITIONAL APPROACH © 2009 IFS 4 SERVER SIDE: • Have to render page from the beginning for every request made by clients. • Consume huge network bandwidth unnecessary to upload same whole documents over and over again. • Duplication of code in server side. • Every computations have to done in the server. • If moving back end to other technology have to rewrite all page rendering codes ones again from scratch.
  • 5. SINGLE PAGE APPLICATION IS A WEB APP IN WHICH THE MAJORITY OF INTERACTION ARE HANDLED ON THE CLIENT WITHOUT THE NEED TO REACH A SERVER, WITH A GOAL OF PROVIDING A MORE FLUID USER EXPERIENCE. © 2009 IFS 5 HOW SPA SOLVE THE PROBLEM?
  • 6. HIGH LEVEL PICTURE OF SPA © 2009 IFS 6 Client side routing Client side rendering SINGLE PAGE APPLICATION+
  • 7. © 2009 IFS 7 © 2009 IFS 7 SPA Life Cycle GET /?a=1&b=2 HTTP/1.1 musicList.html (template) HTTP 1.1 200K content html/text Header + Footer + JS app + CSS Processing The requested document JS app run and request Index page Header + footer + app Processing The requested document GET /?a=1&b=2 HTTP/1.1 initial page HTTP 1.1 200K content html/text Muisc List.html(template) Header + footer + app + Music List(template) 1 2
  • 8. © 2009 IFS 8 1 Header + Footer + JS app + CSS Header + footer + app + Music List(template) General Area which Load template From the Web app Music List template Load from the Web application But no data to display 2
  • 9. © 2009 IFS 9 SPA Life Cycle continue … JS app run and ask data form server API getMusicList() render template From JSON data after received it Processing The requested document Header + footer + app + Product List(rendered by JSON data) POST /request HTTP/1.1 Accept: application/jsonrequest HTTP 1.1 200K content application/json {“pId":“iPhone",“price":7500.0,“type":“smart","zip":94089 } getProductList() Final output 3
  • 10. © 2009 IFS 10 Header + footer + app + Product List(rendered by JSON data)3 Now template is full with Data to view
  • 11. Powered by © 2009 IFS 11 Can Load any contain Without refreshing the Whole page Infinite scrolling Push updates Rest / JSON API
  • 12. SERVER ARCHITECTURES FOR SPA © 2009 IFS 12 • Thin server architecture • Thick stateful server architecture • Thick stateless server architecture
  • 13. HIGH LEVEL PICTURE OF SPA © 2009 IFS 13
  • 14. ADVANTAGES OF USING SPA © 2009 IFS 14 CLIENT SIDE • “Application like” interaction • Back/Forward Button works as expected • More JavaScript than actual HTML • Ability to go offline • Dynamic data loading from the server-side API, Works with Restful Web services • Fluid transitions between page states, Richer Interaction between UI Components. • Markup, CSS and JS required for the application sent with the initial request • Page changes occur via JavaScript using Templates and DOM manipulation • URL hashes are used to track state and provide bookmark able links.
  • 15. SPA CORE BENEFITS © 2009 IFS 15 PERFORMANCE IMPROVEMENT • Load time: 1 file each of HTML, CSS, JS • Static files not dynamic • Less data transfer: XHR calls only send • Raw data, not HTML markup • Load distribution: Less load on the server by distributing it to clients • Can use local storage and caching to decrease amount of network traffic.
  • 16. BUSINESS USAGE OF SPA © 2009 IFS 16 EXAMPLES • Create “App-like user experience” • Bind to your own(or 3rd party) RESTful API • Build Hybrid(native) HTML5 applications • Mobile version of your web site
  • 17. JAVASCRIPT FRAMEWORKS SUPPORT SPA © 2009 IFS 17
  • 18. FEATURES SUPPORTED BY SPA FRAMEWORK © 2009 IFS 18 • Client-Side Templates (Data binding) • Chunking • Controllers • Routing • Real-time communication • Local storage • AJAX • Data transport (XML, JSON and AJAX)
  • 19. HYBRID MOBILE APPLICATIONS SPA MOBILE FRAM © 2009 IFS 19
  • 20. CLOUD COMPUTING WITH INTEGRATE WITH SPA? © 2009 IFS 20 SPA application will deploy in there
  • 21. WEB OPERATING SYSTEMS EXIST IN TODAY USING © 2009 IFS 21 FIREFOX OS Mozilla's attempt to create their own operating system hence the result is Firefox OS. It's based on the Firefox browser and the Gecko rendering engine. Each app using web technologies HTML5, CSS3 and JS and using connect SPA. Those applications some of reside their user data and application on the cloud. This more similar to Chrome OS develop which by Google.
  • 22. WEB OPERATING SYSTEMS EXIST IN TODAY USING © 2009 IFS 22 CHROME OS One of the famous cloud base operating system ins Google chrome OS (fork of the chromium OS project). Google announced Chrome OS on July 7, 2009 describing as an operating arrangement in which both application and user data reside in the cloud. This OS capable to deal with cloud applications(SPA) using SPA. Google also design special hardware for the run Chrome OS.
  • 23. ADVANTAGES AND DISADVANTAGES © 2009 IFS 23 OF USING SPA CONCEPT Disadvantage • Client must enable JavaScript, Single Page Application build with JavaScript, So JavaScript should be enabled in client browser. JavaScript enabled in all modern browsers by default. • Security: Compare to traditional page Single Page Application is less secure due to Cross-site scripting (XSS). • Memory Leak: Memory leak in JavaScript can even cause powerful system to slow down. Advantages • Single Page Application is good for making Responsive Websites, Support mobile, Tablet & Desktop. • No extra queries to the server to download pages. • User friendly. • Performance Improvement, Single Page Application can improve performance in many ways, Single time file load each of HTML, CSS, JS.

Notes de l'éditeur

  1. As is just like a cast but when failed will return a null reference