SlideShare a Scribd company logo
Single Page 
Applications 
李濬志 Jeremy Lee 
@junzhli
“A Single Page Application is a web app that fits on a single 
page with a goal of providing a more fluid user experience” 
from wikipedia
Web Apps not Web Sites
Web Apps 
• Like desktop applications (Word, Photoshop, Skype) 
• Dynamic and ever-changing 
• Rely on you to interact with them 
• Contributing content. (Facebook, Youtube, Twitter) 
• Gathering data from other sources and presenting it to you 
• Always use databases (PHP, Ruby, Python, framework Rails)
Single page application
Characteristics 
• 如同應⽤用程式操作特性 
• URL hash 
• 更豐富的互動界⾯面 
• 資料動態載⼊入 
• 允許離線使⽤用 
• 先載⼊入必要檔案即可 
• …
具備離線能⼒力的 SPA
同時具備離線與線上同步能⼒力的 SPA
SPA Benefit 
• 效能提升 
• 更少的資料傳輸 
• 更多回應放到 Client 處理 
• 分散式載⼊入 (Load distribution) 
• 快取 (Cache) 
• 跨平台 
• 程式碼更易維護 
• 響應式網⾴頁設計 (Responsive Web Design)
技術層⾯面 
• XML, JSON and AJAX 
• HTML DOM 
• CSS 
• JavaScript Frameworks 
• HTML5 WebSockets 
• HTML5 Web Storage
Single page application
Client-side Javascript MV* (MVVM, MVC)
Feature Angular Backbone Ember 
Observables V V V 
Routing V V V 
View bindings V V 
Two way bindings V V 
Partial views V V 
Filtered list views V V
Learning curve and documentation 
• Backbone 
• Ember 
• Angular
Size 
Angular Backbone Ember 
80k 18k 141k 
Size with dependencies 
Backbone needs at least Underscore and Zepto 
Ember needs jQuery and Handlebars 
61K 
269K
http://todomvc.com/
Single Page Application with AngularJS 
• Open-source web application framework 
• model–view–controller (MVC) capability 
• Two-way Data Binding
Single page application
Controller 
• 負責將 ViewModel 與 View 結合產⽣生 UI 
• ⼀一個網⾴頁裡可以有多個 Controller 負責不同元素 
的 Binding
Scope 
• 資料繫結的對象
Templete 
• 在 HTML 中預先定義好的 Angular 特殊元素 
• Directive, Markup, Filter, Form controls
Directive 
• 賦予 Attribute 或 Element 的相關 DOM 元素額外功能 
• like ngBind, ngModel, and ngView 
• 可⾃自定義 Directive
Filter 
• 應⽤用於 Directive,對繫結的資料進⾏行後置處理 
• {{ expression | filter1 | filter2 | ... }} 
• {{ 1234 | number:2 }}
Service 
• 跨 Controller 的功能邏輯 
• 內部服務 (Internal Service) 
$resource service
Router 
• $route service : $routeProvider 
• 瀏覽器導覽按鈕解決⽅方案 
• Bookmarkable
Hello World ! 
Demo 1 
• Angular module 存取範圍宣告 : ng-app 
• Markup : {{sometext}} 
• ng-bind=“sometext” 
• Directive : ng-init, ng-show, ng-hide 
• Filter : {{ sometext | uppercase }}
Todo List part1 
Demo 2 
• angular.module('Todo', []) 
• angular.module(‘Todo’, []).controller(‘todoController’, …) 
• View 與 model 橋樑 : $scope 
• 與外部 View 直接存取 : $scope.todos 
• $scope.addTodo = function(){ … }
Two-way data binding
Todo List part2 
Demo 2 
• $scope.todos.push({'title':$scope.newTodo, ‘done':false}) 
• ng-controller=“todoController” 
• ng-repeat="todo in todos” 
• ng-disabled=“doWhat.$invaild" 
• ng-submit=“addTodo()" 
• ng-class=“{'done':todo.done}"
Routing 
Demo 3 
• <a href=“#One"> 
• <div ng-view></div> 
• sampleApp.config([‘$routeProvider’, …]) 
• sampleApp.controller(‘OneController' …)
Routing 
Demo 3
Photo Gallery 
Demo 4 
• angular.module(‘photoApp’).factory('photoSearchService', …) 
• var service = {}; 
• service.findPhotos = function(keyword, callback) { … }
Dependency Injection
Reference 
• http://viralpatel.net/blogs/angularjs-routing-and-views-tutorial-with-example/ 
• http://blog.miniasp.com/post/2013/04/24/Front-end-Engineering-Fineart-An-Introduction-to-AngularJS.aspx 
• http://www.dotnet-tricks.com/Tutorial/designpatterns/2FMM060314-Understanding-MVC,-MVP-and-MVVM-Design- 
Patterns.html 
• http://blogs.bluepi.in/2014/08/04/why-single-page-application/ 
• http://www.adobe.com/devnet/html5/articles/getting-started-with-angularjs.html 
• http://plexusweb.com/2013/04/web-site-vs-web-application-whats-the-difference/ 
• http://en.wikipedia.org/wiki/Single-page_application 
• http://codepen.io/Russbrown/pen/IgBuh 
• http://blog.codeschool.com/post/85819292538/angular-backbone-or-ember-which-is-best-for-your
“Thanks”
Ad

More Related Content

What's hot (20)

sell idea
sell ideasell idea
sell idea
Rashmi Joshi
 
Azure Cloud Services
Azure Cloud ServicesAzure Cloud Services
Azure Cloud Services
Guy Barrette
 
Express yourself
Express yourselfExpress yourself
Express yourself
Yaniv Rodenski
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
MskDotNet Community
 
Node ts1
Node ts1Node ts1
Node ts1
Yaniv Rodenski
 
Ajax
AjaxAjax
Ajax
reddivarihareesh
 
WordPress Workflows
WordPress WorkflowsWordPress Workflows
WordPress Workflows
Phill Brown
 
Enterprise Portal 2.0
Enterprise Portal 2.0Enterprise Portal 2.0
Enterprise Portal 2.0
Jeremi Joslin
 
MSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure Functions
Marc Obaldo
 
Asp.net
Asp.netAsp.net
Asp.net
Nur Aqilah Ahmad Khairi
 
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solutionDotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Mazenetsolution
 
Blazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksBlazor certification training - Dot Net Tricks
Blazor certification training - Dot Net Tricks
Gaurav Singh
 
Building SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJSBuilding SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJS
SharePointInstitute
 
Rest assured
Rest assuredRest assured
Rest assured
Yaniv Rodenski
 
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
SudhanshuVijay3
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress
ngonpham
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
Jerome Louvel
 
Angular JS and Magento
Angular JS and MagentoAngular JS and Magento
Angular JS and Magento
Vinci Rufus
 
Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5
Brij Mishra
 
Spicing up SharePoint web parts
Spicing up SharePoint web partsSpicing up SharePoint web parts
Spicing up SharePoint web parts
Randy Williams
 
Azure Cloud Services
Azure Cloud ServicesAzure Cloud Services
Azure Cloud Services
Guy Barrette
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
MskDotNet Community
 
WordPress Workflows
WordPress WorkflowsWordPress Workflows
WordPress Workflows
Phill Brown
 
Enterprise Portal 2.0
Enterprise Portal 2.0Enterprise Portal 2.0
Enterprise Portal 2.0
Jeremi Joslin
 
MSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure Functions
Marc Obaldo
 
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solutionDotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Dotnet- An overview of ASP.NET & ADO.NET- Mazenet solution
Mazenetsolution
 
Blazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksBlazor certification training - Dot Net Tricks
Blazor certification training - Dot Net Tricks
Gaurav Singh
 
Building SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJSBuilding SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJS
SharePointInstitute
 
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
SudhanshuVijay3
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress
ngonpham
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
Jerome Louvel
 
Angular JS and Magento
Angular JS and MagentoAngular JS and Magento
Angular JS and Magento
Vinci Rufus
 
Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5
Brij Mishra
 
Spicing up SharePoint web parts
Spicing up SharePoint web partsSpicing up SharePoint web parts
Spicing up SharePoint web parts
Randy Williams
 

Viewers also liked (20)

Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer Conference
AllFacebook.de
 
Writing SPA in 2017
Writing SPA in 2017Writing SPA in 2017
Writing SPA in 2017
Arek Flinik
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajax
s_pradeep
 
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Edureka!
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
Bharat_Kumawat
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentation
thinkphp
 
single page application
single page applicationsingle page application
single page application
Ravindra K
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
Cipriano Freitas
 
Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application Architecture
Eray Arslan
 
Rits Brown Bag - TypeScript
Rits Brown Bag - TypeScriptRits Brown Bag - TypeScript
Rits Brown Bag - TypeScript
Right IT Services
 
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
Tracy Lee
 
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 Minutes
Tracy Lee
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
Shravan Kumar Kasagoni
 
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
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programming
hchen1
 
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
Anuradha Bandara
 
Getting started with Angular CLI
Getting started with Angular CLIGetting started with Angular CLI
Getting started with Angular CLI
Sasha Vinčić
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
John Staveley
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer Conference
AllFacebook.de
 
Writing SPA in 2017
Writing SPA in 2017Writing SPA in 2017
Writing SPA in 2017
Arek Flinik
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajax
s_pradeep
 
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
Edureka!
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentation
thinkphp
 
single page application
single page applicationsingle page application
single page application
Ravindra K
 
Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application Architecture
Eray Arslan
 
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
Tracy Lee
 
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 Minutes
Tracy 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
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programming
hchen1
 
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
Anuradha Bandara
 
Getting started with Angular CLI
Getting started with Angular CLIGetting started with Angular CLI
Getting started with Angular CLI
Sasha Vinčić
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
John Staveley
 
Ad

Similar to Single page application (20)

First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)
Daniel Toomey
 
Oracle web center
Oracle web centerOracle web center
Oracle web center
East Le
 
Integrated Services for Web Applications
Integrated Services for Web ApplicationsIntegrated Services for Web Applications
Integrated Services for Web Applications
Saltmarch Media
 
DotNetNuke
DotNetNukeDotNetNuke
DotNetNuke
jitendraparmar
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
daveayan
 
Jaspersoft Reporting v5
Jaspersoft Reporting v5Jaspersoft Reporting v5
Jaspersoft Reporting v5
Ahmed Muzammil
 
Service-oriented architecture
Service-oriented architectureService-oriented architecture
Service-oriented architecture
Shalva Usubov
 
What's New in Microsoft Dynamics CRM 2011
What's New in Microsoft Dynamics CRM 2011What's New in Microsoft Dynamics CRM 2011
What's New in Microsoft Dynamics CRM 2011
Audra_Carlisle
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Arun Gupta
 
Enterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBM
Enterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBMEnterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBM
Enterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBM
Data Driven Innovation
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
Dmitry Buzdin
 
Sim-webcast-part1-1aa
Sim-webcast-part1-1aaSim-webcast-part1-1aa
Sim-webcast-part1-1aa
OracleIDM
 
RES Software Online Seminar 10 mei 2011
RES Software Online Seminar 10 mei 2011RES Software Online Seminar 10 mei 2011
RES Software Online Seminar 10 mei 2011
RES Software Nederland
 
UI Dev in Big data world using open source
UI Dev in Big data world using open sourceUI Dev in Big data world using open source
UI Dev in Big data world using open source
Tech Triveni
 
Putting the "Share" and "Point" back in SharePoint 2013
Putting the "Share" and "Point" back in SharePoint 2013Putting the "Share" and "Point" back in SharePoint 2013
Putting the "Share" and "Point" back in SharePoint 2013
C/D/H Technology Consultants
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
PyCon Italia
 
Pimping the ForgeRock Identity Platform for a Billion Users
Pimping the ForgeRock Identity Platform for a Billion UsersPimping the ForgeRock Identity Platform for a Billion Users
Pimping the ForgeRock Identity Platform for a Billion Users
ForgeRock
 
Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012
Agora Group
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development today
Bojan Veljanovski
 
Oracle Application Management Suite
Oracle Application Management SuiteOracle Application Management Suite
Oracle Application Management Suite
OracleVolutionSeries
 
First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)First Look at Azure Logic Apps (BAUG)
First Look at Azure Logic Apps (BAUG)
Daniel Toomey
 
Oracle web center
Oracle web centerOracle web center
Oracle web center
East Le
 
Integrated Services for Web Applications
Integrated Services for Web ApplicationsIntegrated Services for Web Applications
Integrated Services for Web Applications
Saltmarch Media
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
daveayan
 
Jaspersoft Reporting v5
Jaspersoft Reporting v5Jaspersoft Reporting v5
Jaspersoft Reporting v5
Ahmed Muzammil
 
Service-oriented architecture
Service-oriented architectureService-oriented architecture
Service-oriented architecture
Shalva Usubov
 
What's New in Microsoft Dynamics CRM 2011
What's New in Microsoft Dynamics CRM 2011What's New in Microsoft Dynamics CRM 2011
What's New in Microsoft Dynamics CRM 2011
Audra_Carlisle
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Arun Gupta
 
Enterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBM
Enterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBMEnterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBM
Enterprise Blockchain & Data Sovereignty. Carlo Ferrarini, IBM
Data Driven Innovation
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
Dmitry Buzdin
 
Sim-webcast-part1-1aa
Sim-webcast-part1-1aaSim-webcast-part1-1aa
Sim-webcast-part1-1aa
OracleIDM
 
RES Software Online Seminar 10 mei 2011
RES Software Online Seminar 10 mei 2011RES Software Online Seminar 10 mei 2011
RES Software Online Seminar 10 mei 2011
RES Software Nederland
 
UI Dev in Big data world using open source
UI Dev in Big data world using open sourceUI Dev in Big data world using open source
UI Dev in Big data world using open source
Tech Triveni
 
Putting the "Share" and "Point" back in SharePoint 2013
Putting the "Share" and "Point" back in SharePoint 2013Putting the "Share" and "Point" back in SharePoint 2013
Putting the "Share" and "Point" back in SharePoint 2013
C/D/H Technology Consultants
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
PyCon Italia
 
Pimping the ForgeRock Identity Platform for a Billion Users
Pimping the ForgeRock Identity Platform for a Billion UsersPimping the ForgeRock Identity Platform for a Billion Users
Pimping the ForgeRock Identity Platform for a Billion Users
ForgeRock
 
Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012
Agora Group
 
DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development today
Bojan Veljanovski
 
Oracle Application Management Suite
Oracle Application Management SuiteOracle Application Management Suite
Oracle Application Management Suite
OracleVolutionSeries
 
Ad

Recently uploaded (20)

Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Michelle Rumley & Mairéad Mooney, Boole Library, University College Cork. Tra...
Library Association of Ireland
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 

Single page application

  • 1. Single Page Applications 李濬志 Jeremy Lee @junzhli
  • 2. “A Single Page Application is a web app that fits on a single page with a goal of providing a more fluid user experience” from wikipedia
  • 3. Web Apps not Web Sites
  • 4. Web Apps • Like desktop applications (Word, Photoshop, Skype) • Dynamic and ever-changing • Rely on you to interact with them • Contributing content. (Facebook, Youtube, Twitter) • Gathering data from other sources and presenting it to you • Always use databases (PHP, Ruby, Python, framework Rails)
  • 6. Characteristics • 如同應⽤用程式操作特性 • URL hash • 更豐富的互動界⾯面 • 資料動態載⼊入 • 允許離線使⽤用 • 先載⼊入必要檔案即可 • …
  • 9. SPA Benefit • 效能提升 • 更少的資料傳輸 • 更多回應放到 Client 處理 • 分散式載⼊入 (Load distribution) • 快取 (Cache) • 跨平台 • 程式碼更易維護 • 響應式網⾴頁設計 (Responsive Web Design)
  • 10. 技術層⾯面 • XML, JSON and AJAX • HTML DOM • CSS • JavaScript Frameworks • HTML5 WebSockets • HTML5 Web Storage
  • 13. Feature Angular Backbone Ember Observables V V V Routing V V V View bindings V V Two way bindings V V Partial views V V Filtered list views V V
  • 14. Learning curve and documentation • Backbone • Ember • Angular
  • 15. Size Angular Backbone Ember 80k 18k 141k Size with dependencies Backbone needs at least Underscore and Zepto Ember needs jQuery and Handlebars 61K 269K
  • 17. Single Page Application with AngularJS • Open-source web application framework • model–view–controller (MVC) capability • Two-way Data Binding
  • 19. Controller • 負責將 ViewModel 與 View 結合產⽣生 UI • ⼀一個網⾴頁裡可以有多個 Controller 負責不同元素 的 Binding
  • 21. Templete • 在 HTML 中預先定義好的 Angular 特殊元素 • Directive, Markup, Filter, Form controls
  • 22. Directive • 賦予 Attribute 或 Element 的相關 DOM 元素額外功能 • like ngBind, ngModel, and ngView • 可⾃自定義 Directive
  • 23. Filter • 應⽤用於 Directive,對繫結的資料進⾏行後置處理 • {{ expression | filter1 | filter2 | ... }} • {{ 1234 | number:2 }}
  • 24. Service • 跨 Controller 的功能邏輯 • 內部服務 (Internal Service) $resource service
  • 25. Router • $route service : $routeProvider • 瀏覽器導覽按鈕解決⽅方案 • Bookmarkable
  • 26. Hello World ! Demo 1 • Angular module 存取範圍宣告 : ng-app • Markup : {{sometext}} • ng-bind=“sometext” • Directive : ng-init, ng-show, ng-hide • Filter : {{ sometext | uppercase }}
  • 27. Todo List part1 Demo 2 • angular.module('Todo', []) • angular.module(‘Todo’, []).controller(‘todoController’, …) • View 與 model 橋樑 : $scope • 與外部 View 直接存取 : $scope.todos • $scope.addTodo = function(){ … }
  • 29. Todo List part2 Demo 2 • $scope.todos.push({'title':$scope.newTodo, ‘done':false}) • ng-controller=“todoController” • ng-repeat="todo in todos” • ng-disabled=“doWhat.$invaild" • ng-submit=“addTodo()" • ng-class=“{'done':todo.done}"
  • 30. Routing Demo 3 • <a href=“#One"> • <div ng-view></div> • sampleApp.config([‘$routeProvider’, …]) • sampleApp.controller(‘OneController' …)
  • 32. Photo Gallery Demo 4 • angular.module(‘photoApp’).factory('photoSearchService', …) • var service = {}; • service.findPhotos = function(keyword, callback) { … }
  • 34. Reference • http://viralpatel.net/blogs/angularjs-routing-and-views-tutorial-with-example/ • http://blog.miniasp.com/post/2013/04/24/Front-end-Engineering-Fineart-An-Introduction-to-AngularJS.aspx • http://www.dotnet-tricks.com/Tutorial/designpatterns/2FMM060314-Understanding-MVC,-MVP-and-MVVM-Design- Patterns.html • http://blogs.bluepi.in/2014/08/04/why-single-page-application/ • http://www.adobe.com/devnet/html5/articles/getting-started-with-angularjs.html • http://plexusweb.com/2013/04/web-site-vs-web-application-whats-the-difference/ • http://en.wikipedia.org/wiki/Single-page_application • http://codepen.io/Russbrown/pen/IgBuh • http://blog.codeschool.com/post/85819292538/angular-backbone-or-ember-which-is-best-for-your