SlideShare una empresa de Scribd logo
1 de 15
S.P.A-SINGLE PAGE APPLICATION
It's also single-page interface (SPI), is a web application or web site
that fits on a single web page with the goal of providing a more fluid
user experience akin(same) to a desktop application
In a SPA, either all necessary code – HTML, JavaScript, and CSS – is
retrieved with a single page load,or the appropriate resources are
dynamically loaded and added to the page as necessary, usually in
response to user actions.
S.P.A
The page does not reload at any point in the process, nor does control transfer
to another page, although modern web technologies (such as those included in
HTML5) can provide the perception and navigability of separate logical
pages in the application. Interaction with the single page application often
involves dynamic communication with the web server behind the scenes.
The term single-page application was coined by Steve Yen in 2005,
few distinct characteristics of the
professional Single Page Application:

CHUNKING

CONTROLLERS

TEMPLATING

ROUTING

REAL-TIME COMMUNICATION

LOCAL STORAGE

CHUNKING-the web page is constructed by loading chunks of
HTML fragments and JSON data instead of receiving full HTML
from a web server on every request. (Backbone.js, pjax, jQuery,
Upshot.js)

CONTROLLERS-JavaScript code that handles complex DOM
and data manipulations, application logic and AJAX calls is
replaced by controllers that separate views and models using MVC
or MVVM patterns. (Backbone.js, Knockout.js, JavascriptMVC)

TEMPLATING-coding of UI and DOM manipulations are replaced
by declarative binding of data to HTML templates. (Knockout.js,
Mustache, jQuery Templates, Underscore.js)

Routing – selection of views and navigation (without
page reloads) that preserves page state, elements and
data (History.js, Crossroads.js, Backbone.js, pjax,
HTML5 History API)

Real-time communication – two-way communication
of a client application and web server replaces one-way
requests from a browser (HTML5 Web Sockets,
Socket.io, SignalR)

Local storage – capabilities of storing data on a
browser for performance and offline access replace
cookies and intensive data loads from web server
(HTML5 Local storage).
Javascript frameworks(angularjs)

AngularJS is a fully client-side library. AngularJS's templating is
based on bidirectional data binding.

Data-binding is an automatic way of updating the view whenever
the model changes, as well as updating the model whenever the
view changes.

The html template is compiled in the browser. The compilation step
creates pure html, upon which the browser re-renders into the live
view. The step is repeated for subsequent page views.

In traditional server-side html programming, concepts such as
controller and model interact within a server process to produce
new html views.

In the AngularJS framework, the controller and model state are
maintained within the client browser. Therefore new pages are
generated without any interaction with a server.

Websockets:

WebSockets are a part of HTML5 spec and is used for single page apps

Browser plugins:

Asynchronous calls to the server may also be achieved using browser
plug-in technologies such as Silverlight, Flash, or Java applets.

Data transport (XML, JSON and AJAX):

Requests to the server typically result in either raw data (e.g. XML or
JSON), or new HTML being returned. In the case where HTML is
returned by the server, JavaScript on the client updates a partial area of
the DOM (Document Object Model). When raw data is returned, often a
client-side JavaScript XML / (XSL) process ( and in case of JSON a
template ) is used to translate the raw data into HTML, which is then used
to update a partial area of the DOM.
DOM

The Document Object Model (DOM) is a cross-platform and language-
independent convention for representing and interacting with objects in
HTML, XHTML and XML documents.

Objects in the DOM tree may be addressed and manipulated by using
methods on the objects.

The public interface of a DOM is specified in its application
programming interface (API).

The history of the Document Object Model is intertwined with the
history of the "browser wars" of the late 1990s between Netscape
Navigator and Microsoft Internet Explorer, as well as with that of
JavaScript and JScript, the first scripting languages to be widely
implemented in the layout engines of web browsers.
.
Hieararchy of objects in an example HTML DOM
DOM implementation

DOM supports navigation in any direction (e.g., parent and previous
sibling) and allows for arbitrary modifications, an implementation must
at least buffer the document that has been read so far (or some parsed
form of it).

Layout engineS:

Web browsers rely on layout engines to parse HTML into a DOM. Some
layout engines, such as Trident/MSHTML, are associated primarily or
exclusively with a particular browser, such as Internet Explorer.

Others, such as Blink, WebKit, and Gecko, JavaScript rendered in html
pages, collection of web pages shared by a number of browsers, such as
Google Chrome, Opera, Safari, and Firefox. The different layout
engines implement the DOM standards to varying degrees of
compliance.
Server Architecture
Thin server architecture-
A SPA moves logic from the server to the client.This results in the role of the web
server evolving into a pure data API or web service.
Thick stateful server architecture-
The server keeps the necessary state in memory of the client state of the page. In this way, when any request
hits the server (usually user actions), the server sends the appropriate HTML and/or JavaScript with the
concrete changes to bring the client to the new desired state (usually adding/deleting/updating a part of the
client DOM). At the same time, the state in server is updated. Most of the logic is executed on the server,
and HTML is usually also rendered on the server. In some ways, the server simulates a web browser,
receiving events and performing delta changes in server state which are automatically propagated to
client.
Thick stateless server architecture - the client page sends the necessary data of the current state to the
server, usually through AJAX requests. The server with this data is able to reconstruct in some way the
client state of the page part going to be modified and generate the necessary data or code, for instance as
JavaScript code, returned to the client to bring it to a new state, usually modifying the page DOM tree
according to the action which motivated the request.
This approach requires more data sent to server and may require more computational resources per request to
reconstruct partially or fully the client page state in server. At the same time, this approach is more easily
scalable because there is no per client page data kept in server and therefore AJAX requests can be
dispatched to different server nodes with no need of session data sharing or server affinity.
Challenges with the SPA model

Because the SPA is an evolution away from the stateless page-redraw
model that browsers were originally designed for, some new challenges
have emerged. Each of these problems has an effective solution with:
i. Client-side JavaScript libraries addressing various issues.
ii. Server side web frameworks that specialize in the SPA model.
iii. The evolution of browsers and the HTML5 specification aimed at the
SPA model.
A) SEARCH ENGINE OPTIMIZATION
B) BROWSER HISTORY
C) PAGE LIFE CYCLE
SEO

Because of the lack of JavaScript execution on crawlers of all popular
Web search engines, SEO (Search engine optimization) has historically
presented a problem for public facing websites wishing to adopt the SPA
model.

Google currently crawls URLs containing hash fragments starting with
#!,. This allows the use of hash fragments within the single URL of an
SPA.

Special behavior must be implemented by the SPA site to allow
extraction of relevant metadata by the search engine's crawler.

For search engines that do not support this URL hash scheme, the
hashed URLs of the SPA remain invisible.
Browser History

The model breaks the browser's design for page history navigation
using the Forward/Back buttons. This presents a usability impediment
when a user presses the back button, expecting the previous screen state
within the SPA, but instead the application's single page unloads and the
previous page in the browser's history is presented.

The traditional solution for SPA's has been to change the browser URL's
hash fragment identifier in accord with the current screen state. This can
be achieved with JavaScript, and causes URL history events to be built
up within the browser. As long as the SPA is capable of resurrecting the
same screen state from information contained within the URL hash, the
expected back button behavior is retained.
Page Lifecycle
An SPA is fully loaded in the initial page load and then page regions are replaced or updated
with new page fragments loaded from the server on demand.

To avoid excessive downloading of unused features, an SPA will often progressively download
more features as they become required, either small fragments of the page, or complete screen
modules.

In this way an analogy exists between "states" in an SPA and "pages" in a traditional web site.
Because "state navigation" in the same page is analogous to page navigation, in theory any page
based web site could be converted to single-page replacing in the same page only the changed
parts result of comparing consecutive pages in a non-SPA.

The SPA approach on the web is similar to the Single Document Interface (SDI) presentation
technique popular in native desktop applications.

Running locally:

Some SPAs may be executed from a local file using the file URI scheme. This gives users the
ability to download the SPA from a server and run the file from a local storage device, without
depending on server connectivity. If such an SPA wants to store and update data, it must use
browser-based Web Storage. These applications benefit from advances available with HTML5.

Más contenido relacionado

La actualidad más candente

Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSM R Rony
 
Full stack devlopment using django main ppt
Full stack devlopment using django main pptFull stack devlopment using django main ppt
Full stack devlopment using django main pptSudhanshuVijay3
 
Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App ArchitecturesRaphael Stary
 
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebChris Canal
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSean McLellan
 
Pros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppPros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppRavi Teja
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)Gustaf Nilsson Kotte
 
Single page applications
Single page applicationsSingle page applications
Single page applicationsPrafful Garg
 
Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRafael Casuso Romate
 
Back to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentBack to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentClint LaForest
 
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 InterfaceDomingo Suarez Torres
 
Building productivity solutions with Microsoft Graph
Building productivity solutions with Microsoft GraphBuilding productivity solutions with Microsoft Graph
Building productivity solutions with Microsoft GraphWaldek Mastykarz
 
Learning Single page Application chapter 1
Learning Single page Application chapter 1Learning Single page Application chapter 1
Learning Single page Application chapter 1Puguh Rismadi
 
Client side vs server side
Client side vs server sideClient side vs server side
Client side vs server sideabgjim96
 
Ajax Using JSP with prototype.js
Ajax Using JSP with prototype.jsAjax Using JSP with prototype.js
Ajax Using JSP with prototype.jsTushar Chauhan
 
Refactoring to a Single Page Application
Refactoring to a Single Page ApplicationRefactoring to a Single Page Application
Refactoring to a Single Page ApplicationCodemotion
 
Deep-dive building solutions on the SharePoint Framework
Deep-dive building solutions on the SharePoint FrameworkDeep-dive building solutions on the SharePoint Framework
Deep-dive building solutions on the SharePoint FrameworkWaldek Mastykarz
 

La actualidad más candente (20)

Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
 
Single page App
Single page AppSingle page App
Single page App
 
Full stack devlopment using django main ppt
Full stack devlopment using django main pptFull stack devlopment using django main ppt
Full stack devlopment using django main ppt
 
Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App Architectures
 
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer Preview
 
Pros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside AppPros and Cons of developing a Thick Clientside App
Pros and Cons of developing a Thick Clientside App
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)
 
Single page applications
Single page applicationsSingle page applications
Single page applications
 
Rise and Fall of the Frontend Developer
Rise and Fall of the Frontend DeveloperRise and Fall of the Frontend Developer
Rise and Fall of the Frontend Developer
 
Back to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web DevelopmentBack to the Basics - 1 - Introduction to Web Development
Back to the Basics - 1 - Introduction to Web Development
 
A Gentle Introduction to Blazor
A Gentle Introduction to BlazorA Gentle Introduction to Blazor
A Gentle Introduction to Blazor
 
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
 
Building productivity solutions with Microsoft Graph
Building productivity solutions with Microsoft GraphBuilding productivity solutions with Microsoft Graph
Building productivity solutions with Microsoft Graph
 
Learning Single page Application chapter 1
Learning Single page Application chapter 1Learning Single page Application chapter 1
Learning Single page Application chapter 1
 
Client side vs server side
Client side vs server sideClient side vs server side
Client side vs server side
 
Ajax Using JSP with prototype.js
Ajax Using JSP with prototype.jsAjax Using JSP with prototype.js
Ajax Using JSP with prototype.js
 
Refactoring to a Single Page Application
Refactoring to a Single Page ApplicationRefactoring to a Single Page Application
Refactoring to a Single Page Application
 
Deep-dive building solutions on the SharePoint Framework
Deep-dive building solutions on the SharePoint FrameworkDeep-dive building solutions on the SharePoint Framework
Deep-dive building solutions on the SharePoint Framework
 

Destacado

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-cliTracy Lee
 
Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application ArchitectureEray Arslan
 
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!Sirar Salih
 
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 MinutesTracy Lee
 
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...Tracy Lee
 
Single page application
Single page applicationSingle page application
Single page applicationJeremy Lee
 
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 levelAnuradha Bandara
 
Getting started with Angular CLI
Getting started with Angular CLIGetting started with Angular CLI
Getting started with Angular CLISasha Vinčić
 
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 CLIJim Lynch
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2Mike Melusky
 
Angular 2 vs Angular 1
Angular 2 vs Angular 1Angular 2 vs Angular 1
Angular 2 vs Angular 1GDG Odessa
 

Destacado (20)

Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
 
Rits Brown Bag - TypeScript
Rits Brown Bag - TypeScriptRits Brown Bag - TypeScript
Rits Brown Bag - 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
 
Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application Architecture
 
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!
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
 
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
 
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
 
Single page application
Single page applicationSingle page application
Single page application
 
Getting started with Angular CLI
Getting started with Angular CLIGetting started with Angular CLI
Getting started with Angular CLI
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
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
 
Node js for beginners
Node js for beginnersNode js for beginners
Node js for beginners
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Node js
Node jsNode js
Node js
 
Angular 2 vs Angular 1
Angular 2 vs Angular 1Angular 2 vs Angular 1
Angular 2 vs Angular 1
 
Getting started with typescript
Getting started with typescriptGetting started with typescript
Getting started with typescript
 

Similar a single page application

Single Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for BeginnersSingle Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for BeginnersInexture Solutions
 
Components of a Generic Web Application Architecture
Components of  a Generic Web Application ArchitectureComponents of  a Generic Web Application Architecture
Components of a Generic Web Application ArchitectureMadonnaLamin1
 
Angular webinar - Credo Systemz
Angular webinar - Credo SystemzAngular webinar - Credo Systemz
Angular webinar - Credo SystemzTraining Institute
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by GoogleASG
 
Introduction To Website Development
Introduction To Website DevelopmentIntroduction To Website Development
Introduction To Website Developmentzaidfarooqui974
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web ApplicationSachin Walvekar
 
Component based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between RoutesComponent based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between RoutesIRJET Journal
 
Esc 209 paper_doin
Esc 209 paper_doinEsc 209 paper_doin
Esc 209 paper_doinJonny Doin
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeaturesvsnmurthy
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeaturesguest9b7f4753
 
Ajax
AjaxAjax
AjaxHome
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone jsGil Fink
 

Similar a single page application (20)

Web 2 0 Tools
Web 2 0 ToolsWeb 2 0 Tools
Web 2 0 Tools
 
Single Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for BeginnersSingle Page Application (SPA): A Comprehensive Guide for Beginners
Single Page Application (SPA): A Comprehensive Guide for Beginners
 
Ajax
AjaxAjax
Ajax
 
technology@web
technology@webtechnology@web
technology@web
 
Components of a Generic Web Application Architecture
Components of  a Generic Web Application ArchitectureComponents of  a Generic Web Application Architecture
Components of a Generic Web Application Architecture
 
Overview of AJAX
Overview of AJAXOverview of AJAX
Overview of AJAX
 
Angular webinar - Credo Systemz
Angular webinar - Credo SystemzAngular webinar - Credo Systemz
Angular webinar - Credo Systemz
 
Single Page Application
Single Page ApplicationSingle Page Application
Single Page Application
 
AJAX
AJAXAJAX
AJAX
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
Ajax Ppt 1
Ajax Ppt 1Ajax Ppt 1
Ajax Ppt 1
 
Introduction To Website Development
Introduction To Website DevelopmentIntroduction To Website Development
Introduction To Website Development
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
Component based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between RoutesComponent based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between Routes
 
Esc 209 paper_doin
Esc 209 paper_doinEsc 209 paper_doin
Esc 209 paper_doin
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeatures
 
Web 2 0 Fullfeatures
Web 2 0 FullfeaturesWeb 2 0 Fullfeatures
Web 2 0 Fullfeatures
 
Ajax
AjaxAjax
Ajax
 
Ajax
AjaxAjax
Ajax
 
Single page applications with backbone js
Single page applications with backbone jsSingle page applications with backbone js
Single page applications with backbone js
 

Último

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 

Último (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 

single page application

  • 1. S.P.A-SINGLE PAGE APPLICATION It's also single-page interface (SPI), is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin(same) to a desktop application In a SPA, either all necessary code – HTML, JavaScript, and CSS – is retrieved with a single page load,or the appropriate resources are dynamically loaded and added to the page as necessary, usually in response to user actions.
  • 2. S.P.A The page does not reload at any point in the process, nor does control transfer to another page, although modern web technologies (such as those included in HTML5) can provide the perception and navigability of separate logical pages in the application. Interaction with the single page application often involves dynamic communication with the web server behind the scenes. The term single-page application was coined by Steve Yen in 2005,
  • 3. few distinct characteristics of the professional Single Page Application:  CHUNKING  CONTROLLERS  TEMPLATING  ROUTING  REAL-TIME COMMUNICATION  LOCAL STORAGE
  • 4.  CHUNKING-the web page is constructed by loading chunks of HTML fragments and JSON data instead of receiving full HTML from a web server on every request. (Backbone.js, pjax, jQuery, Upshot.js)  CONTROLLERS-JavaScript code that handles complex DOM and data manipulations, application logic and AJAX calls is replaced by controllers that separate views and models using MVC or MVVM patterns. (Backbone.js, Knockout.js, JavascriptMVC)  TEMPLATING-coding of UI and DOM manipulations are replaced by declarative binding of data to HTML templates. (Knockout.js, Mustache, jQuery Templates, Underscore.js)
  • 5.  Routing – selection of views and navigation (without page reloads) that preserves page state, elements and data (History.js, Crossroads.js, Backbone.js, pjax, HTML5 History API)  Real-time communication – two-way communication of a client application and web server replaces one-way requests from a browser (HTML5 Web Sockets, Socket.io, SignalR)  Local storage – capabilities of storing data on a browser for performance and offline access replace cookies and intensive data loads from web server (HTML5 Local storage).
  • 6. Javascript frameworks(angularjs)  AngularJS is a fully client-side library. AngularJS's templating is based on bidirectional data binding.  Data-binding is an automatic way of updating the view whenever the model changes, as well as updating the model whenever the view changes.  The html template is compiled in the browser. The compilation step creates pure html, upon which the browser re-renders into the live view. The step is repeated for subsequent page views.  In traditional server-side html programming, concepts such as controller and model interact within a server process to produce new html views.  In the AngularJS framework, the controller and model state are maintained within the client browser. Therefore new pages are generated without any interaction with a server.
  • 7.  Websockets:  WebSockets are a part of HTML5 spec and is used for single page apps  Browser plugins:  Asynchronous calls to the server may also be achieved using browser plug-in technologies such as Silverlight, Flash, or Java applets.  Data transport (XML, JSON and AJAX):  Requests to the server typically result in either raw data (e.g. XML or JSON), or new HTML being returned. In the case where HTML is returned by the server, JavaScript on the client updates a partial area of the DOM (Document Object Model). When raw data is returned, often a client-side JavaScript XML / (XSL) process ( and in case of JSON a template ) is used to translate the raw data into HTML, which is then used to update a partial area of the DOM.
  • 8. DOM  The Document Object Model (DOM) is a cross-platform and language- independent convention for representing and interacting with objects in HTML, XHTML and XML documents.  Objects in the DOM tree may be addressed and manipulated by using methods on the objects.  The public interface of a DOM is specified in its application programming interface (API).  The history of the Document Object Model is intertwined with the history of the "browser wars" of the late 1990s between Netscape Navigator and Microsoft Internet Explorer, as well as with that of JavaScript and JScript, the first scripting languages to be widely implemented in the layout engines of web browsers.
  • 9. . Hieararchy of objects in an example HTML DOM
  • 10. DOM implementation  DOM supports navigation in any direction (e.g., parent and previous sibling) and allows for arbitrary modifications, an implementation must at least buffer the document that has been read so far (or some parsed form of it).  Layout engineS:  Web browsers rely on layout engines to parse HTML into a DOM. Some layout engines, such as Trident/MSHTML, are associated primarily or exclusively with a particular browser, such as Internet Explorer.  Others, such as Blink, WebKit, and Gecko, JavaScript rendered in html pages, collection of web pages shared by a number of browsers, such as Google Chrome, Opera, Safari, and Firefox. The different layout engines implement the DOM standards to varying degrees of compliance.
  • 11. Server Architecture Thin server architecture- A SPA moves logic from the server to the client.This results in the role of the web server evolving into a pure data API or web service. Thick stateful server architecture- The server keeps the necessary state in memory of the client state of the page. In this way, when any request hits the server (usually user actions), the server sends the appropriate HTML and/or JavaScript with the concrete changes to bring the client to the new desired state (usually adding/deleting/updating a part of the client DOM). At the same time, the state in server is updated. Most of the logic is executed on the server, and HTML is usually also rendered on the server. In some ways, the server simulates a web browser, receiving events and performing delta changes in server state which are automatically propagated to client. Thick stateless server architecture - the client page sends the necessary data of the current state to the server, usually through AJAX requests. The server with this data is able to reconstruct in some way the client state of the page part going to be modified and generate the necessary data or code, for instance as JavaScript code, returned to the client to bring it to a new state, usually modifying the page DOM tree according to the action which motivated the request. This approach requires more data sent to server and may require more computational resources per request to reconstruct partially or fully the client page state in server. At the same time, this approach is more easily scalable because there is no per client page data kept in server and therefore AJAX requests can be dispatched to different server nodes with no need of session data sharing or server affinity.
  • 12. Challenges with the SPA model  Because the SPA is an evolution away from the stateless page-redraw model that browsers were originally designed for, some new challenges have emerged. Each of these problems has an effective solution with: i. Client-side JavaScript libraries addressing various issues. ii. Server side web frameworks that specialize in the SPA model. iii. The evolution of browsers and the HTML5 specification aimed at the SPA model. A) SEARCH ENGINE OPTIMIZATION B) BROWSER HISTORY C) PAGE LIFE CYCLE
  • 13. SEO  Because of the lack of JavaScript execution on crawlers of all popular Web search engines, SEO (Search engine optimization) has historically presented a problem for public facing websites wishing to adopt the SPA model.  Google currently crawls URLs containing hash fragments starting with #!,. This allows the use of hash fragments within the single URL of an SPA.  Special behavior must be implemented by the SPA site to allow extraction of relevant metadata by the search engine's crawler.  For search engines that do not support this URL hash scheme, the hashed URLs of the SPA remain invisible.
  • 14. Browser History  The model breaks the browser's design for page history navigation using the Forward/Back buttons. This presents a usability impediment when a user presses the back button, expecting the previous screen state within the SPA, but instead the application's single page unloads and the previous page in the browser's history is presented.  The traditional solution for SPA's has been to change the browser URL's hash fragment identifier in accord with the current screen state. This can be achieved with JavaScript, and causes URL history events to be built up within the browser. As long as the SPA is capable of resurrecting the same screen state from information contained within the URL hash, the expected back button behavior is retained.
  • 15. Page Lifecycle An SPA is fully loaded in the initial page load and then page regions are replaced or updated with new page fragments loaded from the server on demand.  To avoid excessive downloading of unused features, an SPA will often progressively download more features as they become required, either small fragments of the page, or complete screen modules.  In this way an analogy exists between "states" in an SPA and "pages" in a traditional web site. Because "state navigation" in the same page is analogous to page navigation, in theory any page based web site could be converted to single-page replacing in the same page only the changed parts result of comparing consecutive pages in a non-SPA.  The SPA approach on the web is similar to the Single Document Interface (SDI) presentation technique popular in native desktop applications.  Running locally:  Some SPAs may be executed from a local file using the file URI scheme. This gives users the ability to download the SPA from a server and run the file from a local storage device, without depending on server connectivity. If such an SPA wants to store and update data, it must use browser-based Web Storage. These applications benefit from advances available with HTML5.