SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
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)
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
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
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”

Más contenido relacionado

La actualidad más candente

Azure Cloud Services
Azure Cloud ServicesAzure Cloud Services
Azure Cloud ServicesGuy Barrette
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...MskDotNet Community
 
WordPress Workflows
WordPress WorkflowsWordPress Workflows
WordPress WorkflowsPhill Brown
 
Enterprise Portal 2.0
Enterprise Portal 2.0Enterprise Portal 2.0
Enterprise Portal 2.0Jeremi Joslin
 
MSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMarc 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 solutionMazenetsolution
 
Blazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksBlazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksGaurav 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 AngularJSSharePointInstitute
 
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
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpressngonpham
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013Jerome Louvel
 
Angular JS and Magento
Angular JS and MagentoAngular JS and Magento
Angular JS and MagentoVinci 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.NET5Brij Mishra
 
Spicing up SharePoint web parts
Spicing up SharePoint web partsSpicing up SharePoint web parts
Spicing up SharePoint web partsRandy Williams
 

La actualidad más candente (20)

sell idea
sell ideasell idea
sell idea
 
Azure Cloud Services
Azure Cloud ServicesAzure Cloud Services
Azure Cloud Services
 
Express yourself
Express yourselfExpress yourself
Express yourself
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
 
Node ts1
Node ts1Node ts1
Node ts1
 
Ajax
AjaxAjax
Ajax
 
WordPress Workflows
WordPress WorkflowsWordPress Workflows
WordPress Workflows
 
Enterprise Portal 2.0
Enterprise Portal 2.0Enterprise Portal 2.0
Enterprise Portal 2.0
 
MSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure FunctionsMSDN Sessions 032817 - Azure Functions
MSDN Sessions 032817 - Azure Functions
 
Asp.net
Asp.netAsp.net
Asp.net
 
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
 
Blazor certification training - Dot Net Tricks
Blazor certification training - Dot Net TricksBlazor certification training - Dot Net Tricks
Blazor certification training - Dot Net Tricks
 
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
 
Rest assured
Rest assuredRest assured
Rest assured
 
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
 
Scaling Wordpress
Scaling WordpressScaling Wordpress
Scaling Wordpress
 
APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013APIdays San Francisco, 06/22/2013
APIdays San Francisco, 06/22/2013
 
Angular JS and Magento
Angular JS and MagentoAngular JS and Magento
Angular JS and Magento
 
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
 
Spicing up SharePoint web parts
Spicing up SharePoint web partsSpicing up SharePoint web parts
Spicing up SharePoint web parts
 

Destacado

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.NETAlan Hecht
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceAllFacebook.de
 
Writing SPA in 2017
Writing SPA in 2017Writing SPA in 2017
Writing SPA in 2017Arek Flinik
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajaxs_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 Presentationthinkphp
 
single page application
single page applicationsingle page application
single page applicationRavindra K
 
Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application ArchitectureEray 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-cliTracy 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 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
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programminghchen1
 
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ć
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentationJohn Staveley
 

Destacado (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
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer Conference
 
Writing SPA in 2017
Writing SPA in 2017Writing SPA in 2017
Writing SPA in 2017
 
Building Applications Using Ajax
Building Applications Using AjaxBuilding Applications Using Ajax
Building Applications Using Ajax
 
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'
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
Ajax Introduction Presentation
Ajax   Introduction   PresentationAjax   Introduction   Presentation
Ajax Introduction Presentation
 
single page application
single page applicationsingle page application
single page application
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
 
Single-Page Web Application Architecture
Single-Page Web Application ArchitectureSingle-Page Web Application Architecture
Single-Page Web Application Architecture
 
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
 
Angular 2 + TypeScript = true. Let's Play!
Angular 2 + TypeScript = true. Let's Play!Angular 2 + TypeScript = true. Let's Play!
Angular 2 + TypeScript = true. Let's Play!
 
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 MinutesUsing Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
 
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programming
 
Angular 1.x vs 2 - In code level
Angular 1.x vs 2 - In code levelAngular 1.x vs 2 - In code level
Angular 1.x vs 2 - In code level
 
Getting started with Angular CLI
Getting started with Angular CLIGetting started with Angular CLI
Getting started with Angular CLI
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
 

Similar a Single page application

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 centerEast Le
 
Integrated Services for Web Applications
Integrated Services for Web ApplicationsIntegrated Services for Web Applications
Integrated Services for Web ApplicationsSaltmarch Media
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferaydaveayan
 
Jaspersoft Reporting v5
Jaspersoft Reporting v5Jaspersoft Reporting v5
Jaspersoft Reporting v5Ahmed Muzammil
 
Service-oriented architecture
Service-oriented architectureService-oriented architecture
Service-oriented architectureShalva 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 2011Audra_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 2014Arun 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, IBMData 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-1aaOracleIDM
 
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 2011RES 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 sourceTech 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 2013C/D/H Technology Consultants
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'EnterprisePyCon 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 UsersForgeRock
 
Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012Agora 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 todayBojan Veljanovski
 
Oracle Application Management Suite
Oracle Application Management SuiteOracle Application Management Suite
Oracle Application Management SuiteOracleVolutionSeries
 

Similar a 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)
 
Oracle web center
Oracle web centerOracle web center
Oracle web center
 
Integrated Services for Web Applications
Integrated Services for Web ApplicationsIntegrated Services for Web Applications
Integrated Services for Web Applications
 
DotNetNuke
DotNetNukeDotNetNuke
DotNetNuke
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
 
Jaspersoft Reporting v5
Jaspersoft Reporting v5Jaspersoft Reporting v5
Jaspersoft Reporting v5
 
Service-oriented architecture
Service-oriented architectureService-oriented architecture
Service-oriented architecture
 
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
 
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
 
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
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
 
Sim-webcast-part1-1aa
Sim-webcast-part1-1aaSim-webcast-part1-1aa
Sim-webcast-part1-1aa
 
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
 
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
 
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
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
 
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
 
Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012Oracle - Document Life - 6apr2012
Oracle - Document Life - 6apr2012
 
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
 
Oracle Application Management Suite
Oracle Application Management SuiteOracle Application Management Suite
Oracle Application Management Suite
 

Último

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
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
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Último (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
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
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
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 ...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 

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)
  • 5.
  • 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
  • 11.
  • 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
  • 18.
  • 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