SlideShare une entreprise Scribd logo
1  sur  33
Maurice de Beijer
Waar gaan we het over hebben?
 Waarom?
 Wie beslist wat HTML 5 is?
 Hoe gaan browsers er mee om?
 Verschillende HTML 5 onderdelen
Wie ben ik
 Maurice de Beijer.
 The Problem Solver.
 Microsoft CSD MVP.
 DevelopMentor instructor.
 Twitter:   @mauricedb
 Blog:      http://msmvps.com/blogs/
             theproblemsolver/default.aspx
 Web:       http://www.TheProblemSolver.nl
 E-mail:    mauricedb@computer.org
Waarom HTML 5
 HTML is de meest verspreide UI technologie
    Maar door browser verschillen lastig om mee te
     werken
 Minder bedrijven ondersteunen een enkel platform
    Bring your own hardware
    Smartphones en tablets ondersteunen geen plugins
 Men wil rijkere applicaties
    Animaties
    Communicatie
    etc
Wie gaat er eigenlijk over?
 De World Wide Web Consortium (W3C)
    Was oorspronkelijk met XHTML2 bezig
 Web Hypertext Application Technology Working
 Group (WHATWG)
   In 2004 begonnen uit onvrede met XHTML2
 Vanaf 2009 samen bezig
    Er wordt gewerkt aan “HTML The Living Standard”
 De W3C neemt een snapshot
    Dat wordt HTML5
Wanneer is het klaar?

  “The Web Hypertext Application Technology
  Working Group, expects HTML5 to reach W3C
 Candidate Recommendation Stage in 2012, and
  graduate to W3C Recommendation in 2022.”
Wanneer is het klaar?

  “The Web Hypertext Application Technology
  Working Group, expects HTML5 to reach W3C
 Candidate Recommendation Stage in 2012, and
  graduate to W3C Recommendation in 2022.”
Browsers
 Vraag niet welke browser HTML 5 ondersteunt
    Geen enkele implementeert de hele standaard!
 Vraag welke browsers een bepaald deel
 implementeren
   CanIUse.com
 En wat je kan doen met de overige browsers
    HTML 5 Polyfills
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.”
Maar welke browsers
 Yahoo Graded Browser Support




 http://browsershots.org/
Google analytics - msmvps.org
 762098 bezoekers laatste maand
Google analytics - msmvps.org
Onderwerpen
 Semantic markup
 Input elementen
 CSS3
 Video & Audio
 Canvas
 Local storage
 Drag-Drop & File IO
 Geolocation
 Web Workers
Semantic markup
 Het gaat om de data, niet hoe het er uit ziet!
 De meest gebruikte CSS classes bij <div> elementen
    <div class=“nav”>
    <div class=“section”>
    <div class=“header”>
    <div class=“footer”>
    <div class=“article”>
    <div class=“aside”>
Semantic markup
 Nu zijn het HTML5 elementen
   <nav>
   <section>
   <header>
   <footer>
   <article>
   <aside>
Input elementen
 De meeste data types moeten met:
      <input type="text" />
 De browser kan helpen als het weet om wat voor
  data het gaat
   search
   url
   number
   datetime
   Etc.
Input elementen
 Softkeyboards passen zich aan
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
 Er is een nieuw <video> en <audio> element
 Er is echter geen standaard encoding 
    OGV
    WEBM
    MP4
 Meerdere <source> elementen opgeven
    De browser kiest de eerste die werkt
 Zie Wikipedia voor browser ondersteuning
Canvas
 Een vlak om op te tekenen
    Op dit moment is er alleen een 2D context
 Primitives die je kunt tekenen
    Lines
    Rectangles
    Arcs
    Curves
    Images
    Paths
Canvas
 De hele API wordt via JavaScript aangestuurd
 Zeer krachtig maar lastig om mee te werken
    Er zijn nog niet veel tools
 Er is een AngryBirds versie mee gemaakt
    http://chrome.angrybirds.com/
Local storage - Web Storage
 Name – Value pair storage
    Storage is per site
    Het advies voor browsers is 5Mb max ruimte per site
 sessionStorage
    Geldig gedurende de browser sessie
 localStorage
    Blijft langer bestaan
 De value moet een string zijn!
   sessionStorage['data'] = JSON.stringify({ value: 1 });
   data = JSON.parse(sessionStorage['data']);
Local storage - IndexDB
 Een object of NoSQL store in de database
    Werkt alleen in Chrome en FireFox
    Zie demo
 Er was een Web SQL Database
    Is deprecated en vervangen door de IndexDB
    Werkt nog wel in Webkit browsers (iOS)
Drag-Drop
 Elementen verslepen in de browser
    Ook files uit de Windows Explorer naar een HTML
     element
 Events voor
    dragstart
    dragenter
    dragover
    drop
 Argument bevat een dataTransfer object
File IO
 File IO met een FileReader object
 File kan op verschillende manieren gelezen worden
    readAsArrayBuffer()
    readAsBinaryString()
    readAsDataURL()
    readAsText()
 Als de file gelezen is gaat het onload event af
    De result property bevat de inhoud
File IO
 Soms is een file te groot om helemaal te lezen
 Een Blob is een deel van een file
    Met een file.slice() kan je een blob maken
 Een FileReader object kan ook met een blob werken
Geolocation
 Waar is iemand?
    Bijvoorbeeld om een location based search te doen
 De gebruiker moet toestemming geven
 Werkt zowel in desktop als mobiele browsers
    Nauwkeurigheid kan sterk varieren
 Via het navigator object te vinden
    navigator.geolocation.getCurrentPosition()
 De options ondersteunt
 enableHighAccuracy: true
Geolocation
 De Position bevat minimaal
    latitude
    longitude
    accuracy
Web Workers
 JavaScript mag niet te lang duren van de browser




 Via een Worker() object kan een JavaScript file in de
 achtergrond gestart worden
   Kan wel langer duren
Web Workers
 Web Workers zijn beperkt in wat ze mogen doen
    Niets met het document
 Mogen wel IO doen
    XMLHttpRequest
    FileReader
    importScripts()
 Document kan berichten met worker uitwisselen
    postMessage()
    onmessage callback functie wordt aangeroepen
 Alle data wordt gekloond
Conclusie
 HTML 5 heeft een grote toekomst
    Get is de enige platform onafhankelijke UI techniek
    Zelfs binnen Windows 8 is het belangrijk
 Diverse browsers ondersteunen verschillende
  onderdelen
   Gebruik feature detection om te zien wat wel en niet
   Gebruik polyfills om ontbrekende stukken aan te vullen
 Je hoeft niet te wachten tot het klaar is
    Begin nu en maak betere web applicaties

Contenu connexe

Similaire à HTML5 (Dutch)

20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie Bram20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie BramFARO
 
20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie Bram20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie BramFARO
 
Usabilityweb magazine nr. 7
Usabilityweb magazine nr. 7Usabilityweb magazine nr. 7
Usabilityweb magazine nr. 7srprs.me
 
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo BruggeHTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo BruggePureplexity
 
NL Front-end Guidelines (HTML,CSS,Javascript)
NL Front-end Guidelines (HTML,CSS,Javascript)NL Front-end Guidelines (HTML,CSS,Javascript)
NL Front-end Guidelines (HTML,CSS,Javascript)Mathijs Jong
 
Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)Mark Leusink
 
Bouwstenen voor een moderne webapplicatie
Bouwstenen voor een moderne webapplicatieBouwstenen voor een moderne webapplicatie
Bouwstenen voor een moderne webapplicatieSWIS_Webprojecten
 
General Drupal presentation in Dutch
General Drupal  presentation in DutchGeneral Drupal  presentation in Dutch
General Drupal presentation in DutchRoel Meester
 
WordPress plugin development
WordPress plugin developmentWordPress plugin development
WordPress plugin developmentLuc De Brouwer
 
Page experience de nieuwe ranking factor voor seo
Page experience de nieuwe ranking factor voor seoPage experience de nieuwe ranking factor voor seo
Page experience de nieuwe ranking factor voor seovalantic NL
 
Community Kick Off Slides
Community Kick Off SlidesCommunity Kick Off Slides
Community Kick Off SlidesWouterJansen
 
SharePoint: nieuwe mogelijkheden en best practices
SharePoint: nieuwe mogelijkheden en best practicesSharePoint: nieuwe mogelijkheden en best practices
SharePoint: nieuwe mogelijkheden en best practicesDelta-N
 

Similaire à HTML5 (Dutch) (20)

Html5 App
Html5 AppHtml5 App
Html5 App
 
20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie Bram20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie Bram
 
20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie Bram20081126 Hands On Presentatie Bram
20081126 Hands On Presentatie Bram
 
Usabilityweb magazine nr. 7
Usabilityweb magazine nr. 7Usabilityweb magazine nr. 7
Usabilityweb magazine nr. 7
 
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo BruggeHTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Android
AndroidAndroid
Android
 
NL Front-end Guidelines (HTML,CSS,Javascript)
NL Front-end Guidelines (HTML,CSS,Javascript)NL Front-end Guidelines (HTML,CSS,Javascript)
NL Front-end Guidelines (HTML,CSS,Javascript)
 
Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)Introduction to Bootstrap (with XPages)
Introduction to Bootstrap (with XPages)
 
WSO2 Mashup Server
WSO2 Mashup ServerWSO2 Mashup Server
WSO2 Mashup Server
 
Bouwstenen voor een moderne webapplicatie
Bouwstenen voor een moderne webapplicatieBouwstenen voor een moderne webapplicatie
Bouwstenen voor een moderne webapplicatie
 
General Drupal presentation in Dutch
General Drupal  presentation in DutchGeneral Drupal  presentation in Dutch
General Drupal presentation in Dutch
 
WordPress plugin development
WordPress plugin developmentWordPress plugin development
WordPress plugin development
 
Html5
Html5Html5
Html5
 
HTML5 & rest services
HTML5 & rest servicesHTML5 & rest services
HTML5 & rest services
 
Page experience de nieuwe ranking factor voor seo
Page experience de nieuwe ranking factor voor seoPage experience de nieuwe ranking factor voor seo
Page experience de nieuwe ranking factor voor seo
 
2010 byte joomladagen
2010 byte joomladagen2010 byte joomladagen
2010 byte joomladagen
 
Community Kick Off Slides
Community Kick Off SlidesCommunity Kick Off Slides
Community Kick Off Slides
 
Excellent rest met de web api
Excellent rest met de web apiExcellent rest met de web api
Excellent rest met de web api
 
SharePoint: nieuwe mogelijkheden en best practices
SharePoint: nieuwe mogelijkheden en best practicesSharePoint: nieuwe mogelijkheden en best practices
SharePoint: nieuwe mogelijkheden en best practices
 

Plus de 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]
 
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]
 
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]
 
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]
 

Plus de 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
 

HTML5 (Dutch)

  • 2. Waar gaan we het over hebben?  Waarom?  Wie beslist wat HTML 5 is?  Hoe gaan browsers er mee om?  Verschillende HTML 5 onderdelen
  • 3. Wie ben ik  Maurice de Beijer.  The Problem Solver.  Microsoft CSD MVP.  DevelopMentor instructor.  Twitter: @mauricedb  Blog: http://msmvps.com/blogs/ theproblemsolver/default.aspx  Web: http://www.TheProblemSolver.nl  E-mail: mauricedb@computer.org
  • 4. Waarom HTML 5  HTML is de meest verspreide UI technologie  Maar door browser verschillen lastig om mee te werken  Minder bedrijven ondersteunen een enkel platform  Bring your own hardware  Smartphones en tablets ondersteunen geen plugins  Men wil rijkere applicaties  Animaties  Communicatie  etc
  • 5. Wie gaat er eigenlijk over?  De World Wide Web Consortium (W3C)  Was oorspronkelijk met XHTML2 bezig  Web Hypertext Application Technology Working Group (WHATWG)  In 2004 begonnen uit onvrede met XHTML2  Vanaf 2009 samen bezig  Er wordt gewerkt aan “HTML The Living Standard”  De W3C neemt een snapshot  Dat wordt HTML5
  • 6. Wanneer is het klaar? “The Web Hypertext Application Technology Working Group, expects HTML5 to reach W3C Candidate Recommendation Stage in 2012, and graduate to W3C Recommendation in 2022.”
  • 7. Wanneer is het klaar? “The Web Hypertext Application Technology Working Group, expects HTML5 to reach W3C Candidate Recommendation Stage in 2012, and graduate to W3C Recommendation in 2022.”
  • 8. Browsers  Vraag niet welke browser HTML 5 ondersteunt  Geen enkele implementeert de hele standaard!  Vraag welke browsers een bepaald deel implementeren  CanIUse.com  En wat je kan doen met de overige browsers  HTML 5 Polyfills
  • 9. 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/
  • 10. Polyfills “A polyfill is a piece of code (or plugin) that provides the technology that you, the developer, expect the browser to provide natively.”
  • 11. Maar welke browsers  Yahoo Graded Browser Support  http://browsershots.org/
  • 12. Google analytics - msmvps.org  762098 bezoekers laatste maand
  • 13. Google analytics - msmvps.org
  • 14. Onderwerpen  Semantic markup  Input elementen  CSS3  Video & Audio  Canvas  Local storage  Drag-Drop & File IO  Geolocation  Web Workers
  • 15. Semantic markup  Het gaat om de data, niet hoe het er uit ziet!  De meest gebruikte CSS classes bij <div> elementen  <div class=“nav”>  <div class=“section”>  <div class=“header”>  <div class=“footer”>  <div class=“article”>  <div class=“aside”>
  • 16. Semantic markup  Nu zijn het HTML5 elementen  <nav>  <section>  <header>  <footer>  <article>  <aside>
  • 17. Input elementen  De meeste data types moeten met: <input type="text" />  De browser kan helpen als het weet om wat voor data het gaat  search  url  number  datetime  Etc.
  • 19. 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; }
  • 20. 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;}
  • 21. Video & Audio  Er is een nieuw <video> en <audio> element  Er is echter geen standaard encoding   OGV  WEBM  MP4  Meerdere <source> elementen opgeven  De browser kiest de eerste die werkt  Zie Wikipedia voor browser ondersteuning
  • 22. Canvas  Een vlak om op te tekenen  Op dit moment is er alleen een 2D context  Primitives die je kunt tekenen  Lines  Rectangles  Arcs  Curves  Images  Paths
  • 23. Canvas  De hele API wordt via JavaScript aangestuurd  Zeer krachtig maar lastig om mee te werken  Er zijn nog niet veel tools  Er is een AngryBirds versie mee gemaakt  http://chrome.angrybirds.com/
  • 24. Local storage - Web Storage  Name – Value pair storage  Storage is per site  Het advies voor browsers is 5Mb max ruimte per site  sessionStorage  Geldig gedurende de browser sessie  localStorage  Blijft langer bestaan  De value moet een string zijn! sessionStorage['data'] = JSON.stringify({ value: 1 }); data = JSON.parse(sessionStorage['data']);
  • 25. Local storage - IndexDB  Een object of NoSQL store in de database  Werkt alleen in Chrome en FireFox  Zie demo  Er was een Web SQL Database  Is deprecated en vervangen door de IndexDB  Werkt nog wel in Webkit browsers (iOS)
  • 26. Drag-Drop  Elementen verslepen in de browser  Ook files uit de Windows Explorer naar een HTML element  Events voor  dragstart  dragenter  dragover  drop  Argument bevat een dataTransfer object
  • 27. File IO  File IO met een FileReader object  File kan op verschillende manieren gelezen worden  readAsArrayBuffer()  readAsBinaryString()  readAsDataURL()  readAsText()  Als de file gelezen is gaat het onload event af  De result property bevat de inhoud
  • 28. File IO  Soms is een file te groot om helemaal te lezen  Een Blob is een deel van een file  Met een file.slice() kan je een blob maken  Een FileReader object kan ook met een blob werken
  • 29. Geolocation  Waar is iemand?  Bijvoorbeeld om een location based search te doen  De gebruiker moet toestemming geven  Werkt zowel in desktop als mobiele browsers  Nauwkeurigheid kan sterk varieren  Via het navigator object te vinden  navigator.geolocation.getCurrentPosition()  De options ondersteunt enableHighAccuracy: true
  • 30. Geolocation  De Position bevat minimaal  latitude  longitude  accuracy
  • 31. Web Workers  JavaScript mag niet te lang duren van de browser  Via een Worker() object kan een JavaScript file in de achtergrond gestart worden  Kan wel langer duren
  • 32. Web Workers  Web Workers zijn beperkt in wat ze mogen doen  Niets met het document  Mogen wel IO doen  XMLHttpRequest  FileReader  importScripts()  Document kan berichten met worker uitwisselen  postMessage()  onmessage callback functie wordt aangeroepen  Alle data wordt gekloond
  • 33. Conclusie  HTML 5 heeft een grote toekomst  Get is de enige platform onafhankelijke UI techniek  Zelfs binnen Windows 8 is het belangrijk  Diverse browsers ondersteunen verschillende onderdelen  Gebruik feature detection om te zien wat wel en niet  Gebruik polyfills om ontbrekende stukken aan te vullen  Je hoeft niet te wachten tot het klaar is  Begin nu en maak betere web applicaties