SlideShare a Scribd company logo
1 of 39
Maurice de Beijer
Agenda
๏‚— Why HTML5?
๏‚— How about different browsers?
๏‚— Different parts of HTML5
   ๏‚— Whatever you would like to see ๏Š
Who am I
๏‚— Maurice de Beijer.
๏‚— The Problem Solver.
๏‚— Microsoft CSD MVP.
๏‚— DevelopMentor instructor.
๏‚— Twitter:   @mauricedb of @HTML5SupportNL
๏‚— Blog:      http://msmvps.com/blogs/theproblemsolver/
๏‚— Web:       http://www.HTML5Support.nl
๏‚— E-mail:    mauricedb@computer.org
Why HTML5
๏‚— HTML is the most used UI technology
   ๏‚— But differences in browser implementation make it
     hard to work with
๏‚— Companies need to support a wide range of devices
   ๏‚— Bring your own hardware
   ๏‚— Smartphones and tablets donโ€™t support plugins
๏‚— Users want richer applications
   ๏‚— Animations
   ๏‚— Communication
   ๏‚— etc.
What works in which browser?
๏‚— CanIUse.com
Google analytics - Browser & OS
๏‚— 553846 visits last month
Google analytics - IE
Modernizr

 โ€œModernizr is an open-source JavaScript library
that helps you build the next generation of HTML5
           and CSS3-powered websites.โ€



           http://www.modernizr.com/
Polyfills

   โ€œA polyfill is a piece of code (or plugin) that
 provides the technology that you, the developer,
     expect the browser to provide natively.โ€
Google Chrome Frame
๏‚— Use Google Chrome inside of Internet Explorer
  ๏‚— Works with IE 6 and later
๏‚— Only activated for pages that explicitly request it
     <meta http-equiv="X-UA-Compatible" content="chrome=1">


๏‚— The meta tag is ignored if Chrome Frame isnยดt
  installed
HTML5 subjects
๏‚—   Semantic markup
๏‚—   Input elements
๏‚—   CSS3
๏‚—   Video & Audio
๏‚—   Canvas & SGV
๏‚—   Local storage
๏‚—   Drag-Drop & File IO
๏‚—   Geolocation
๏‚—   Web Workers
๏‚—   Offline Web applications
๏‚—   Server Sent Events & WebSockets
Semantic markup
๏‚— The most commonly used CSS classes for <div>
 elements
  ๏‚— <div class=โ€œnavโ€>
  ๏‚— <div class=โ€œsectionโ€>
  ๏‚— <div class=โ€œheaderโ€>
  ๏‚— <div class=โ€œfooterโ€>
  ๏‚— <div class=โ€œarticleโ€>
  ๏‚— <div class=โ€œasideโ€>
Semantic markup
๏‚— Have become HTML5 elements
   ๏‚— <nav>
   ๏‚— <section>
   ๏‚— <header>
   ๏‚— <footer>
   ๏‚— <article>
   ๏‚— <aside>
Input elements
๏‚— Most data types are entered as plain text:
      <input type="text" />
๏‚— The browser can provide additional help if it knows
  the actual data type
  ๏‚— search
  ๏‚— url
  ๏‚— number
  ๏‚— datetime
  ๏‚— Etc.
Input elements
๏‚— Soft keyboards can auto adjust




๏‚— http://bit.ly/InputElements
CSS 3
๏‚— Rounded corners
   .box {border-radius: 10px;}
๏‚— Drop shadows
   .box {box-shadow: 10px 5px 5px grey;}
๏‚— Gradients
   .box {background: linear-gradient(Yellow, Lime);}
๏‚— Multi column text
   article {column-count: 3; }
CSS 3
๏‚— Media queries
   @media screen and (max-width: 1024px) {
      aside {
         display: none;
      }
    }
๏‚— Transforms
   .box:hover {transform: scale(1.2);}
๏‚— Transitions
   .box {transition: transform 1s ease-in;}
Video & Audio
๏‚— HTML5 includes a <video> and <audio> element
๏‚— There is no standard encoding ๏Œ
   ๏‚— OGV
   ๏‚— WEBM
   ๏‚— MP4
๏‚— Add multiple <source> elements
   ๏‚— The browser will use the first it supports
๏‚— See Wikipedia for browser support
Canvas
๏‚— A simple drawing surface
   ๏‚— Currently only a 2D context
   ๏‚— But 3D is in the works
๏‚— Uses drawing primitives
   ๏‚— Lines
   ๏‚— Rectangles
   ๏‚— Arcs
   ๏‚— Curves
   ๏‚— Images
   ๏‚— Paths
Canvas
๏‚— The entire API is JavaScript based
   ๏‚— There are no drawing markup elements
๏‚— Very powerful but tedious to work with
   ๏‚— Tooling support is limited
    ๏‚—   Adobeยฎ Illustratorยฎ plugin
    ๏‚—   Leonardo Sketch
๏‚— Used to create a HTML version of Angry Birds
   ๏‚— http://chrome.angrybirds.com/
Scallable Vector Graphics
๏‚— Use retained mode
   ๏‚— There is an object model we can manipulate
   ๏‚— The Canvas uses imediate mode
๏‚— Browser support is about the same as with Canvas
   ๏‚— Tooling support is much better
Scallable Vector Graphics
๏‚— Uses drawing shapes
   ๏‚— Lines
   ๏‚— Rectangle
   ๏‚— Circles
   ๏‚— Text
   ๏‚— Path
   ๏‚— Etc.
๏‚— Elements can be created using markup
   ๏‚— Or JavaScript when needed
When to use SVG versus Canvas
  Canvas                             SVG

  Pixel based (Dynamic .png)         Shape based

  Single HTML element                Multiple graphical elements,
                                     which become part of the DOM

  Modified through script only       Modified through script and CSS

  Event model/user interaction is    Event model/user interaction is
  granular (x,y)                     abstracted (rect, path)

  Performance is better with smaller Performance is better with smaller
  surface, a larger number of objects number of objects (<10k), a larger
  (>10k), or both                     surface, or both
Local storage - Web Storage
๏‚— Name โ€“ Value pair storage
   ๏‚— Storage is per site
   ๏‚— The standard recommends 5Mb storage space per site
๏‚— sessionStorage
   ๏‚— Valid for the duration of a browser session
๏‚— localStorage
   ๏‚— Valid for longer periods
๏‚— The value stored must be a string!
   sessionStorage['data'] = JSON.stringify({ value: 1 });
   data = JSON.parse(sessionStorage['data']);
Local storage - IndexedDB
๏‚— An object or NoSQL store in the database
   ๏‚— Only supported in Chrome en Firefox
   ๏‚— See demo
๏‚— There was a Web SQL Database
   ๏‚— Itโ€™s deprecated and replaced by the IndexedDB
   ๏‚— Still functional in Webkit browsers (iOS)
   ๏‚— Apple pushed this standard
Drag-Drop
๏‚— Move elements in the browser
   ๏‚— Drag files from the Windows Explorer to an HTML
     element
๏‚— Events fire for
   ๏‚— dragstart
   ๏‚— dragenter
   ๏‚— dragover
   ๏‚— drop
๏‚— The argument contain a dataTransfer object
File IO
๏‚— File IO can be done using a FileReader object
๏‚— File can be read in different ways
   ๏‚— readAsArrayBuffer()
   ๏‚— readAsBinaryString()
   ๏‚— readAsDataURL()
   ๏‚— readAsText()
๏‚— Once the file content have been read the onload
 event fires
  ๏‚— The result property contains the file contents
File IO
๏‚— Some file are to large to read in one action
๏‚— A Blob is a part of a file
   ๏‚— Use file.slice() to create a blob
๏‚— A FileReader object can work with a blob as if it is a
 file
Geolocation
๏‚— Where is the user?
   ๏‚— For example to do a location based search
๏‚— Always requires the users consent
๏‚— Works both on desktop and mobile browsers
   ๏‚— Accuracy can vary widely
๏‚— Use the navigator object
   ๏‚— navigator.geolocation.getCurrentPosition()
๏‚— The options support enableHighAccuracy: true
Geolocation
๏‚— The resulting Position contains at least
   ๏‚— latitude
   ๏‚— longitude
   ๏‚— accuracy
Web Workers
๏‚— JavaScript execution time is limited by the browser




๏‚— Using a Worker() object JavaScript can be executed in
 the background
  ๏‚— These scripts can execute for a long time
Web Workers
๏‚— Web Workers are limited in what they can do
   ๏‚— No interactions with the DOM
๏‚— They can do IO
   ๏‚— XMLHttpRequest
   ๏‚— FileReader
   ๏‚— importScripts()
๏‚— The Document can exchange messages with the worker
   ๏‚— postMessage()
   ๏‚— onmessage callback function is called
๏‚— All data is cloned
   ๏‚— Never passed by reference
Offline Web Applications
๏‚— A web application can load and execute without a
  network connection
๏‚— The cache manifest determines what resources are
  available offline
๏‚— The cached resources are always loaded from the cache
  ๏‚— The manifest is used to update the cache
  ๏‚— This is done after the page is loaded
  ๏‚— And only happens if the content of the cache is
    changed
Offline Web Applications
๏‚— Manifest contains sections for:
   ๏‚— Cache (default)
   ๏‚— Network
   ๏‚— Fallback
๏‚— The manifest must be served with the correct mime type
  ๏‚— text/cache-manifest
  ๏‚— Otherwise itโ€™s ignored
Server Sent Events
๏‚— Push communication from the Server to the browser
   ๏‚— Uses standard HTTP techniques to transfer data
๏‚— Everything is just HTTP traffic
   ๏‚— A formalization of long polling techniques
   ๏‚— Be careful with connection that remain open for to long
     (30 seconds to max 2 minutes)
Server Sent Events
๏‚— EventSource object
   ๏‚— Functions:
    ๏‚—   close()
  ๏‚— Events
    ๏‚—   onmessage
    ๏‚—   onopen
    ๏‚—   onerror
        ๏‚— Also used when the connection is closed
WebSockets
๏‚— Full duplex communication between the browser and
  the server
๏‚— No longer HTTP traffic
  ๏‚— Starts as an HTTP request
  ๏‚— The server upgrades to WS by returning a โ€œ101 Switching
    Protocolsโ€ response
๏‚— Support is still limited
   ๏‚— Only Chrome and Firefox
WebSockets
๏‚— WebSocket object
  ๏‚— Functions:
    ๏‚—   send() to transfer data
         ๏‚— Can also be binary data!

    ๏‚—   close()
  ๏‚— Events
    ๏‚—   onmessage
    ๏‚—   onopen
    ๏‚—   onclose
    ๏‚—   onerror
Conclusion
๏‚— HTML 5 has a big future
   ๏‚— Its the only platform independent UI technology
   ๏‚— Even used for Windows 8 development
๏‚— Different browsers offer support for features
   ๏‚— Use feature detection to check what works
   ๏‚— Use polyfills in case of missing features
๏‚— No need to wait until itยดs a standard
   ๏‚— Large parts are usable today

More Related Content

What's hot

Architecting For The Windows Azure Platform
Architecting For The Windows Azure PlatformArchitecting For The Windows Azure Platform
Architecting For The Windows Azure PlatformDavid Chou
ย 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDBNorberto Leite
ย 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5Muktadiur Rahman
ย 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6Novedades de MongoDB 3.6
Novedades de MongoDB 3.6MongoDB
ย 
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...MongoDB
ย 
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and TypescriptMongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and TypescriptMongoDB
ย 
Migrating from MySQL to MongoDB at Wordnik
Migrating from MySQL to MongoDB at WordnikMigrating from MySQL to MongoDB at Wordnik
Migrating from MySQL to MongoDB at WordnikTony Tam
ย 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)Clรฉment Wehrung
ย 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Webphilogb
ย 
MongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB
ย 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBMongoDB
ย 
Java on Windows Azure
Java on Windows AzureJava on Windows Azure
Java on Windows AzureDavid Chou
ย 
HTML5 Introduction
HTML5 IntroductionHTML5 Introduction
HTML5 Introductiondynamis
ย 
MICROSOFT ASP.NET ONLINE TRAINING
MICROSOFT ASP.NET ONLINE TRAININGMICROSOFT ASP.NET ONLINE TRAINING
MICROSOFT ASP.NET ONLINE TRAININGSanthosh Sap
ย 

What's hot (16)

Architecting For The Windows Azure Platform
Architecting For The Windows Azure PlatformArchitecting For The Windows Azure Platform
Architecting For The Windows Azure Platform
ย 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDB
ย 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
ย 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6Novedades de MongoDB 3.6
Novedades de MongoDB 3.6
ย 
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
Lessons Learned from Building a Multi-Tenant Saas Content Management System o...
ย 
What is HTML5
What is HTML5What is HTML5
What is HTML5
ย 
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and TypescriptMongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
ย 
Velocity dust
Velocity dustVelocity dust
Velocity dust
ย 
Migrating from MySQL to MongoDB at Wordnik
Migrating from MySQL to MongoDB at WordnikMigrating from MySQL to MongoDB at Wordnik
Migrating from MySQL to MongoDB at Wordnik
ย 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ย 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
ย 
MongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless WorldMongoDB.local Berlin: App development in a Serverless World
MongoDB.local Berlin: App development in a Serverless World
ย 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
ย 
Java on Windows Azure
Java on Windows AzureJava on Windows Azure
Java on Windows Azure
ย 
HTML5 Introduction
HTML5 IntroductionHTML5 Introduction
HTML5 Introduction
ย 
MICROSOFT ASP.NET ONLINE TRAINING
MICROSOFT ASP.NET ONLINE TRAININGMICROSOFT ASP.NET ONLINE TRAINING
MICROSOFT ASP.NET ONLINE TRAINING
ย 

Similar to HTML5

Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web appsyoavrubin
ย 
Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Boston Area SharePoint Users Group
ย 
The web as it should be
The web as it should beThe web as it should be
The web as it should bethebeebs
ย 
Html5 Interview Questions & Answers
Html5 Interview Questions & AnswersHtml5 Interview Questions & Answers
Html5 Interview Questions & AnswersRatnala Charan kumar
ย 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsIvano Malavolta
ย 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
ย 
Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta Commit University
ย 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
ย 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat ClientPaul Klipp
ย 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Pravasini Sahoo
ย 
Spsmi13 charts
Spsmi13 chartsSpsmi13 charts
Spsmi13 chartsDerek Gusoff
ย 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-airbrucelawson
ย 
Edge of the Web
Edge of the WebEdge of the Web
Edge of the WebTodd Anglin
ย 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8David Chou
ย 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
ย 
What is HTML 5?
What is HTML 5?What is HTML 5?
What is HTML 5?Susan Winters
ย 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScriptMahmoud Tolba
ย 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?dcoletta
ย 
HTML 5
HTML 5HTML 5
HTML 5Rajan Pal
ย 

Similar to HTML5 (20)

Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web apps
ย 
Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4Creating Great Applications in SharePoint 2010 with Silverlight 4
Creating Great Applications in SharePoint 2010 with Silverlight 4
ย 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
ย 
Html5 Interview Questions & Answers
Html5 Interview Questions & AnswersHtml5 Interview Questions & Answers
Html5 Interview Questions & Answers
ย 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
ย 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
ย 
Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta Workshop HTML5+PhoneGap by Ivano Malavolta
Workshop HTML5+PhoneGap by Ivano Malavolta
ย 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
ย 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
ย 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
ย 
Practical html5
Practical html5Practical html5
Practical html5
ย 
Spsmi13 charts
Spsmi13 chartsSpsmi13 charts
Spsmi13 charts
ย 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-air
ย 
Edge of the Web
Edge of the WebEdge of the Web
Edge of the Web
ย 
Internet Explorer 8
Internet Explorer 8Internet Explorer 8
Internet Explorer 8
ย 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
ย 
What is HTML 5?
What is HTML 5?What is HTML 5?
What is HTML 5?
ย 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
ย 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
ย 
HTML 5
HTML 5HTML 5
HTML 5
ย 

More from Maurice De Beijer [MVP]

Practice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppPractice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppMaurice De Beijer [MVP]
ย 
A foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectA foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectMaurice De Beijer [MVP]
ย 
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressMaurice De Beijer [MVP]
ย 
Build reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressBuild reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressMaurice De Beijer [MVP]
ย 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
ย 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Maurice De Beijer [MVP]
ย 
Building reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureBuilding reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureMaurice De Beijer [MVP]
ย 
Building large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactBuilding large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactMaurice De Beijer [MVP]
ย 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureMaurice De Beijer [MVP]
ย 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of ReactMaurice De Beijer [MVP]
ย 
Building reliable web applications using Cypress
Building reliable web applications using CypressBuilding reliable web applications using Cypress
Building reliable web applications using CypressMaurice De Beijer [MVP]
ย 
Getting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent renderingGetting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent renderingMaurice De Beijer [MVP]
ย 
React suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockReact suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockMaurice De Beijer [MVP]
ย 
From zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScriptFrom zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScriptMaurice De Beijer [MVP]
ย 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of ReactMaurice De Beijer [MVP]
ย 
From zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScriptFrom zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScriptMaurice De Beijer [MVP]
ย 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of ReactMaurice De Beijer [MVP]
ย 
Create flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apisCreate flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apisMaurice De Beijer [MVP]
ย 

More from Maurice De Beijer [MVP] (20)

Practice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components AppPractice TypeScript Techniques Building React Server Components App
Practice TypeScript Techniques Building React Server Components App
ย 
A foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software ProjectA foolproof Way to Estimate a Software Project
A foolproof Way to Estimate a Software Project
ย 
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using CypressSurati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
ย 
Build reliable Svelte applications using Cypress
Build reliable Svelte applications using CypressBuild reliable Svelte applications using Cypress
Build reliable Svelte applications using Cypress
ย 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & Azure
ย 
Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18Concurrent Rendering Adventures in React 18
Concurrent Rendering Adventures in React 18
ย 
Building reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and AzureBuilding reliable applications with React, C#, and Azure
Building reliable applications with React, C#, and Azure
ย 
Building large and scalable mission critical applications with React
Building large and scalable mission critical applications with ReactBuilding large and scalable mission critical applications with React
Building large and scalable mission critical applications with React
ย 
Building Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & AzureBuilding Reliable Applications Using React, .NET & Azure
Building Reliable Applications Using React, .NET & Azure
ย 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of React
ย 
Building reliable web applications using Cypress
Building reliable web applications using CypressBuilding reliable web applications using Cypress
Building reliable web applications using Cypress
ย 
Getting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent renderingGetting started with React Suspense and concurrent rendering
Getting started with React Suspense and concurrent rendering
ย 
React suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred HitchcockReact suspense, not just for Alfred Hitchcock
React suspense, not just for Alfred Hitchcock
ย 
From zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScriptFrom zero to hero with the Reactive extensions for JavaScript
From zero to hero with the Reactive extensions for JavaScript
ย 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of React
ย 
The new React
The new React The new React
The new React
ย 
From zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScriptFrom zero to hero with the reactive extensions for JavaScript
From zero to hero with the reactive extensions for JavaScript
ย 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of React
ย 
I am hooked on React
I am hooked on ReactI am hooked on React
I am hooked on React
ย 
Create flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apisCreate flexible React applications using GraphQL apis
Create flexible React applications using GraphQL apis
ย 

Recently uploaded

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
ย 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
ย 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
ย 
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜
๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜RTylerCroy
ย 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
ย 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
ย 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
ย 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
ย 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
ย 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
ย 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araรบjo
ย 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
ย 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
ย 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
ย 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
ย 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
ย 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
ย 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
ย 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
ย 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
ย 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
ย 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
ย 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
ย 
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜
๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜๐Ÿฌ  The future of MySQL is Postgres   ๐Ÿ˜
๐Ÿฌ The future of MySQL is Postgres ๐Ÿ˜
ย 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
ย 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
ย 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
ย 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
ย 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
ย 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
ย 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
ย 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
ย 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
ย 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
ย 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
ย 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
ย 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
ย 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
ย 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
ย 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
ย 

HTML5

  • 2. Agenda ๏‚— Why HTML5? ๏‚— How about different browsers? ๏‚— Different parts of HTML5 ๏‚— Whatever you would like to see ๏Š
  • 3. Who am I ๏‚— Maurice de Beijer. ๏‚— The Problem Solver. ๏‚— Microsoft CSD MVP. ๏‚— DevelopMentor instructor. ๏‚— Twitter: @mauricedb of @HTML5SupportNL ๏‚— Blog: http://msmvps.com/blogs/theproblemsolver/ ๏‚— Web: http://www.HTML5Support.nl ๏‚— E-mail: mauricedb@computer.org
  • 4. Why HTML5 ๏‚— HTML is the most used UI technology ๏‚— But differences in browser implementation make it hard to work with ๏‚— Companies need to support a wide range of devices ๏‚— Bring your own hardware ๏‚— Smartphones and tablets donโ€™t support plugins ๏‚— Users want richer applications ๏‚— Animations ๏‚— Communication ๏‚— etc.
  • 5. What works in which browser? ๏‚— CanIUse.com
  • 6. Google analytics - Browser & OS ๏‚— 553846 visits last month
  • 8. Modernizr โ€œModernizr is an open-source JavaScript library that helps you build the next generation of HTML5 and CSS3-powered websites.โ€ http://www.modernizr.com/
  • 9. Polyfills โ€œA polyfill is a piece of code (or plugin) that provides the technology that you, the developer, expect the browser to provide natively.โ€
  • 10. Google Chrome Frame ๏‚— Use Google Chrome inside of Internet Explorer ๏‚— Works with IE 6 and later ๏‚— Only activated for pages that explicitly request it <meta http-equiv="X-UA-Compatible" content="chrome=1"> ๏‚— The meta tag is ignored if Chrome Frame isnยดt installed
  • 11. HTML5 subjects ๏‚— Semantic markup ๏‚— Input elements ๏‚— CSS3 ๏‚— Video & Audio ๏‚— Canvas & SGV ๏‚— Local storage ๏‚— Drag-Drop & File IO ๏‚— Geolocation ๏‚— Web Workers ๏‚— Offline Web applications ๏‚— Server Sent Events & WebSockets
  • 12. Semantic markup ๏‚— The most commonly used CSS classes for <div> elements ๏‚— <div class=โ€œnavโ€> ๏‚— <div class=โ€œsectionโ€> ๏‚— <div class=โ€œheaderโ€> ๏‚— <div class=โ€œfooterโ€> ๏‚— <div class=โ€œarticleโ€> ๏‚— <div class=โ€œasideโ€>
  • 13. Semantic markup ๏‚— Have become HTML5 elements ๏‚— <nav> ๏‚— <section> ๏‚— <header> ๏‚— <footer> ๏‚— <article> ๏‚— <aside>
  • 14. Input elements ๏‚— Most data types are entered as plain text: <input type="text" /> ๏‚— The browser can provide additional help if it knows the actual data type ๏‚— search ๏‚— url ๏‚— number ๏‚— datetime ๏‚— Etc.
  • 15. Input elements ๏‚— Soft keyboards can auto adjust ๏‚— http://bit.ly/InputElements
  • 16. CSS 3 ๏‚— Rounded corners .box {border-radius: 10px;} ๏‚— Drop shadows .box {box-shadow: 10px 5px 5px grey;} ๏‚— Gradients .box {background: linear-gradient(Yellow, Lime);} ๏‚— Multi column text article {column-count: 3; }
  • 17. CSS 3 ๏‚— Media queries @media screen and (max-width: 1024px) { aside { display: none; } } ๏‚— Transforms .box:hover {transform: scale(1.2);} ๏‚— Transitions .box {transition: transform 1s ease-in;}
  • 18. Video & Audio ๏‚— HTML5 includes a <video> and <audio> element ๏‚— There is no standard encoding ๏Œ ๏‚— OGV ๏‚— WEBM ๏‚— MP4 ๏‚— Add multiple <source> elements ๏‚— The browser will use the first it supports ๏‚— See Wikipedia for browser support
  • 19. Canvas ๏‚— A simple drawing surface ๏‚— Currently only a 2D context ๏‚— But 3D is in the works ๏‚— Uses drawing primitives ๏‚— Lines ๏‚— Rectangles ๏‚— Arcs ๏‚— Curves ๏‚— Images ๏‚— Paths
  • 20. Canvas ๏‚— The entire API is JavaScript based ๏‚— There are no drawing markup elements ๏‚— Very powerful but tedious to work with ๏‚— Tooling support is limited ๏‚— Adobeยฎ Illustratorยฎ plugin ๏‚— Leonardo Sketch ๏‚— Used to create a HTML version of Angry Birds ๏‚— http://chrome.angrybirds.com/
  • 21. Scallable Vector Graphics ๏‚— Use retained mode ๏‚— There is an object model we can manipulate ๏‚— The Canvas uses imediate mode ๏‚— Browser support is about the same as with Canvas ๏‚— Tooling support is much better
  • 22. Scallable Vector Graphics ๏‚— Uses drawing shapes ๏‚— Lines ๏‚— Rectangle ๏‚— Circles ๏‚— Text ๏‚— Path ๏‚— Etc. ๏‚— Elements can be created using markup ๏‚— Or JavaScript when needed
  • 23. When to use SVG versus Canvas Canvas SVG Pixel based (Dynamic .png) Shape based Single HTML element Multiple graphical elements, which become part of the DOM Modified through script only Modified through script and CSS Event model/user interaction is Event model/user interaction is granular (x,y) abstracted (rect, path) Performance is better with smaller Performance is better with smaller surface, a larger number of objects number of objects (<10k), a larger (>10k), or both surface, or both
  • 24. Local storage - Web Storage ๏‚— Name โ€“ Value pair storage ๏‚— Storage is per site ๏‚— The standard recommends 5Mb storage space per site ๏‚— sessionStorage ๏‚— Valid for the duration of a browser session ๏‚— localStorage ๏‚— Valid for longer periods ๏‚— The value stored must be a string! sessionStorage['data'] = JSON.stringify({ value: 1 }); data = JSON.parse(sessionStorage['data']);
  • 25. Local storage - IndexedDB ๏‚— An object or NoSQL store in the database ๏‚— Only supported in Chrome en Firefox ๏‚— See demo ๏‚— There was a Web SQL Database ๏‚— Itโ€™s deprecated and replaced by the IndexedDB ๏‚— Still functional in Webkit browsers (iOS) ๏‚— Apple pushed this standard
  • 26. Drag-Drop ๏‚— Move elements in the browser ๏‚— Drag files from the Windows Explorer to an HTML element ๏‚— Events fire for ๏‚— dragstart ๏‚— dragenter ๏‚— dragover ๏‚— drop ๏‚— The argument contain a dataTransfer object
  • 27. File IO ๏‚— File IO can be done using a FileReader object ๏‚— File can be read in different ways ๏‚— readAsArrayBuffer() ๏‚— readAsBinaryString() ๏‚— readAsDataURL() ๏‚— readAsText() ๏‚— Once the file content have been read the onload event fires ๏‚— The result property contains the file contents
  • 28. File IO ๏‚— Some file are to large to read in one action ๏‚— A Blob is a part of a file ๏‚— Use file.slice() to create a blob ๏‚— A FileReader object can work with a blob as if it is a file
  • 29. Geolocation ๏‚— Where is the user? ๏‚— For example to do a location based search ๏‚— Always requires the users consent ๏‚— Works both on desktop and mobile browsers ๏‚— Accuracy can vary widely ๏‚— Use the navigator object ๏‚— navigator.geolocation.getCurrentPosition() ๏‚— The options support enableHighAccuracy: true
  • 30. Geolocation ๏‚— The resulting Position contains at least ๏‚— latitude ๏‚— longitude ๏‚— accuracy
  • 31. Web Workers ๏‚— JavaScript execution time is limited by the browser ๏‚— Using a Worker() object JavaScript can be executed in the background ๏‚— These scripts can execute for a long time
  • 32. Web Workers ๏‚— Web Workers are limited in what they can do ๏‚— No interactions with the DOM ๏‚— They can do IO ๏‚— XMLHttpRequest ๏‚— FileReader ๏‚— importScripts() ๏‚— The Document can exchange messages with the worker ๏‚— postMessage() ๏‚— onmessage callback function is called ๏‚— All data is cloned ๏‚— Never passed by reference
  • 33. Offline Web Applications ๏‚— A web application can load and execute without a network connection ๏‚— The cache manifest determines what resources are available offline ๏‚— The cached resources are always loaded from the cache ๏‚— The manifest is used to update the cache ๏‚— This is done after the page is loaded ๏‚— And only happens if the content of the cache is changed
  • 34. Offline Web Applications ๏‚— Manifest contains sections for: ๏‚— Cache (default) ๏‚— Network ๏‚— Fallback ๏‚— The manifest must be served with the correct mime type ๏‚— text/cache-manifest ๏‚— Otherwise itโ€™s ignored
  • 35. Server Sent Events ๏‚— Push communication from the Server to the browser ๏‚— Uses standard HTTP techniques to transfer data ๏‚— Everything is just HTTP traffic ๏‚— A formalization of long polling techniques ๏‚— Be careful with connection that remain open for to long (30 seconds to max 2 minutes)
  • 36. Server Sent Events ๏‚— EventSource object ๏‚— Functions: ๏‚— close() ๏‚— Events ๏‚— onmessage ๏‚— onopen ๏‚— onerror ๏‚— Also used when the connection is closed
  • 37. WebSockets ๏‚— Full duplex communication between the browser and the server ๏‚— No longer HTTP traffic ๏‚— Starts as an HTTP request ๏‚— The server upgrades to WS by returning a โ€œ101 Switching Protocolsโ€ response ๏‚— Support is still limited ๏‚— Only Chrome and Firefox
  • 38. WebSockets ๏‚— WebSocket object ๏‚— Functions: ๏‚— send() to transfer data ๏‚— Can also be binary data! ๏‚— close() ๏‚— Events ๏‚— onmessage ๏‚— onopen ๏‚— onclose ๏‚— onerror
  • 39. Conclusion ๏‚— HTML 5 has a big future ๏‚— Its the only platform independent UI technology ๏‚— Even used for Windows 8 development ๏‚— Different browsers offer support for features ๏‚— Use feature detection to check what works ๏‚— Use polyfills in case of missing features ๏‚— No need to wait until itยดs a standard ๏‚— Large parts are usable today