building web front ends using single page applications

11
Building web front ends using Single Page Applications Dave Voyles Technical Evangelist Email: [email protected] @DaveVoyles

Upload: david-voyles

Post on 04-Aug-2015

47 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Building web front ends using single page applications

Building web front ends

using Single Page Applications

Dave VoylesTechnical Evangelist

Email: [email protected]

@DaveVoyles

Page 2: Building web front ends using single page applications

Agenda

1)Building the GeekQuiz front-end

Page 3: Building web front ends using single page applications

Single Page ApplicationsOverview and frameworks

Page 4: Building web front ends using single page applications

Client Browse

r

WebServer

Request: http://site.com/products/

Response: Full pageHTMLCSS

ImagesJavascript

Comparison: standard page requests

Request: http://site.com/products/6

Response: Full pageHTMLCSS

ImagesJavascript

Page 5: Building web front ends using single page applications

Client Browse

r

WebServer

Request: http://site.com/products/

Response: Full pageHTMLCSS

ImagesJavascript

Comparison: Single Page Application

Request: http://site.com/products/6

Response: Tiny bit of data{product}

Page 6: Building web front ends using single page applications

Declarative Bindings

Automatic UI refresh

Dependency Tracking

Templating

Knockout.js

Page 7: Building web front ends using single page applications

Custom Tag

Attributes

Powerful Directives

Declarative Style

Strict Separation

AngularJS

<!doctype html> <html ng-app="app"> <body>     <tabs>         <pane title="Localization">             Date: {{ '2013-04-01' | date:'fullDate' }} <br>             Currency: {{ 123456 | currency }} <br>             Number: {{ 98765.4321 | number }} <br>         </pane>         <pane title="Pluralization">             <div ng-controller="BeerCounter">                 <div ng-repeat="beerCount in beers">                     <ng-pluralize                          count="beerCount“                          when="beerForms">                     </ng-pluralize>                 </div>             </div>         </pane>     </tabs> </body></html>

Page 8: Building web front ends using single page applications

Ember is a framework

Convention over config

URLs are important

Ember.js

Page 9: Building web front ends using single page applications

DemoBuilding the GeekQuiz front end w/ Angular

Page 10: Building web front ends using single page applications

Summary Building the GeekQuiz front end

Page 11: Building web front ends using single page applications

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.