HTML5, are we there yet?                            Jax CodeCamp, Oct 2012                                Ovidiu Dimulescu...
Agenda                      •   What is HTML5?                      •   Features                      •   Polyfills and shi...
About @odimulescu         • Working on the Web since 1997         • Into startup and engineering cultures         • Speake...
What is   ?Saturday, October 6, 12
HTML- A bit of history         * Credit evolutionofweb.appspot.comSaturday, October 6, 12
HTML- A bit of history         * Credit evolutionofweb.appspot.comSaturday, October 6, 12
HTML- A bit of history         * Credit evolutionofweb.appspot.comSaturday, October 6, 12
HTML5- What is it?         • W3C, WHATWG         • HTML, DHTML, XHTML, Quirks mode         • JSON, AJAX, Web Forms, Web So...
HTML5 - What is it?         An evolution of HTML4            • New DOM elements            • New JavaScript APIs         H...
HTML5- FeaturesSaturday, October 6, 12
HTML5- Document StructureSaturday, October 6, 12
HTML5 - Semantic TagsSaturday, October 6, 12
HTML5 - Semantic Tags                                                    No DIV !?         *Image Credit: indianlakes.word...
HTML5 - Semantic Tags                                                       Text            *Credit: www.w3.org/wiki/HTML_...
HTML5 - Semantic Tags            *Credit: www.w3.org/wiki/HTML_structural_elementsSaturday, October 6, 12
HTML5 - Semantic Tags            *Credit: www.w3.org/wiki/HTML_structural_elementsSaturday, October 6, 12
HTML5 - Semantic Tags            *Credit: www.w3.org/wiki/HTML_structural_elementsSaturday, October 6, 12
HTML5 - Semantic Tags         Browser Support          Modern Browser, IE9 +         Problems with unknown tags          1...
HTML5 - Forms             New Input Types             tel, url, email, number, range, color, search, datetime, date,      ...
HTML5 - Forms             “Roaming” Form elements              • Can be outside of form elements              • Can belong...
HTML5 - Forms - Status                          wufoo.com/html5Saturday, October 6, 12
HTML5 - Offline applications         Advantages           • UX - Offline usage           • UX - Speed           • Server - ...
HTML5 - Offline Apps - Manifest         •      CACHE MANIFEST is a required first line         •      CACHE section is impli...
HTML5 - Offline Apps - Cache        *Credit: marakana.com/bookshelf/html5_tutorial/offline_applications.htmlSaturday, Octob...
HTML5 - Web Storage         Old Way               Cookies, Flash, Silverlight, AIR, userData in IE, Google Gears         N...
HTML5 - Geolocation         Geo location detection               Global Positioning System (GPS)               Inferred: I...
HTML5 - GeolocationSaturday, October 6, 12
HTML5 - Canvas         Old Way               • Using plugins such as Flash, Silverlight, JavaFX, SVG,VML               • V...
HTML5 - Canvas         Markup         Operations           Context, Transformation, Pixel Manipulation, Compositing, Image...
HTML5 - Canvas | SVG         Coolness           www.chromeweblab.com         Canvas           developer.mozilla.org/en-US/...
HTML5 - Media Elements         Audio & Video tags          • Modern Browser, IE9+          • Codecs support not uniform   ...
HTML5 - Media - videojs.comSaturday, October 6, 12
HTML5 - Polyfills, shims         Audience               Old IEs and modern browser         Solutions              • Moderni...
HTML5 - Status - Use or not?        *Image Credit: WikipediaSaturday, October 6, 12
HTML5 - Status - Use or not?        *Image Credit: coolgraphic.orgSaturday, October 6, 12
HTML5 - Resources             diveintohtml5.info | modernizr.com | iewebgl.com | videojs.com             caniuse.com | htm...
HTML5 - References             diveintohtml5.info             html5rocks.com             html5doctor.com             devel...
Q &ASaturday, October 6, 12
Upcoming SlideShare
Loading in...5
×

HTML5, are we there yet?

939

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
939
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "HTML5, are we there yet?"

  1. 1. HTML5, are we there yet? Jax CodeCamp, Oct 2012 Ovidiu DimulescuSaturday, October 6, 12
  2. 2. Agenda • What is HTML5? • Features • Polyfills and shims • Status • Resources • Q&ASaturday, October 6, 12
  3. 3. About @odimulescu • Working on the Web since 1997 • Into startup and engineering cultures • Speaker at user groups • Organizer for JaxMUG.com • Co-Organizer for Jax Big Data meetupSaturday, October 6, 12
  4. 4. What is ?Saturday, October 6, 12
  5. 5. HTML- A bit of history * Credit evolutionofweb.appspot.comSaturday, October 6, 12
  6. 6. HTML- A bit of history * Credit evolutionofweb.appspot.comSaturday, October 6, 12
  7. 7. HTML- A bit of history * Credit evolutionofweb.appspot.comSaturday, October 6, 12
  8. 8. HTML5- What is it? • W3C, WHATWG • HTML, DHTML, XHTML, Quirks mode • JSON, AJAX, Web Forms, Web Sockets, Web Workers • Navigation History State, CORS • DOM (Style, Events, HTML) • CSS, Media Queries, Web Fonts • Canvas, SVG, Audio,Video, WebGL • Local Storage, Offline Apps • HTML5 App, Single Page appSaturday, October 6, 12
  9. 9. HTML5 - What is it? An evolution of HTML4 • New DOM elements • New JavaScript APIs HTML5 is a “brand” • CSS3 • Additional Rich APIs • Umbrella term for cool web thingsSaturday, October 6, 12
  10. 10. HTML5- FeaturesSaturday, October 6, 12
  11. 11. HTML5- Document StructureSaturday, October 6, 12
  12. 12. HTML5 - Semantic TagsSaturday, October 6, 12
  13. 13. HTML5 - Semantic Tags No DIV !? *Image Credit: indianlakes.wordpress.comSaturday, October 6, 12
  14. 14. HTML5 - Semantic Tags Text *Credit: www.w3.org/wiki/HTML_structural_elementsSaturday, October 6, 12
  15. 15. HTML5 - Semantic Tags *Credit: www.w3.org/wiki/HTML_structural_elementsSaturday, October 6, 12
  16. 16. HTML5 - Semantic Tags *Credit: www.w3.org/wiki/HTML_structural_elementsSaturday, October 6, 12
  17. 17. HTML5 - Semantic Tags *Credit: www.w3.org/wiki/HTML_structural_elementsSaturday, October 6, 12
  18. 18. HTML5 - Semantic Tags Browser Support Modern Browser, IE9 + Problems with unknown tags 1. Default style inline + Styles not applied (oldIE) 2. DOM incorrect (oldIE) Workarounds 1. header, footer, nav, section { display: block} 2. <script>document.createElement("article");</script> code.google.com/p/html5shim/Saturday, October 6, 12
  19. 19. HTML5 - Forms New Input Types tel, url, email, number, range, color, search, datetime, date, month, week, time, datetime-local New Form and Input Type Attributes placeholder, required, autofocus, autocomplete, pattern, step, list, min, max, range, accept, multiple New Elements progress, meter, datalist, outputSaturday, October 6, 12
  20. 20. HTML5 - Forms “Roaming” Form elements • Can be outside of form elements • Can belong to multiple forms Validation Pseudo selectors :invalid and :required * Constraint Validation API checkValidity, setCustomValidity, willValidate DOM-less Form Submissions FormData -> XMLHttpRequest.send()Saturday, October 6, 12
  21. 21. HTML5 - Forms - Status wufoo.com/html5Saturday, October 6, 12
  22. 22. HTML5 - Offline applications Advantages • UX - Offline usage • UX - Speed • Server - Reduced load Caveats • No love from IE < 10 • Size limitation 5MB (iOS 6 is up to 25MB) • Server side add text/cache-manifest mime-type Reference • Extension is not important but mime-type is • Absolute (same origin) and relative URI • Cached as a regular HTTP resource headers*Saturday, October 6, 12
  23. 23. HTML5 - Offline Apps - Manifest • CACHE MANIFEST is a required first line • CACHE section is implicit, default behavior • Syntax checking *very* strict. Any error aborts caching • If any resources fails loading aborts cache update • CACHE does not support wildcards. Explicit path needed • A page referencing a manifest file is implicitly cached • Relative URIs are relative to the cache manifests URI See appcachefacts.info for various quirksSaturday, October 6, 12
  24. 24. HTML5 - Offline Apps - Cache *Credit: marakana.com/bookshelf/html5_tutorial/offline_applications.htmlSaturday, October 6, 12
  25. 25. HTML5 - Web Storage Old Way Cookies, Flash, Silverlight, AIR, userData in IE, Google Gears New Way • Isolation per sub-domain and per protocol. Does not expire until cleared • 5MB limit.Values are Strings. Webkit stores UTF-16 -> 2.5MB effective storage • No mechanism when quota is exceeded to prompt the user • Prompts the user first time for permission to store data • Well supported: IE8+. Use history.js shim for older browsersSaturday, October 6, 12
  26. 26. HTML5 - Geolocation Geo location detection Global Positioning System (GPS) Inferred: IP address, MAC, Cellphone IDs, etc. User Input Required Attributes latitude, longitude and accuracy are guaranteed in supporting browsers Other attributes will just return null if the information cannot be provided Browser Support IE9+, Modern Browser Privacy Concerns User agent has to explicitly ask for user permission to obtain location Recipients must disclose the data usage: How long the location data is stored? Is it shared with other sites/partners? Can the location data be updated or deleted by the end user?Saturday, October 6, 12
  27. 27. HTML5 - GeolocationSaturday, October 6, 12
  28. 28. HTML5 - Canvas Old Way • Using plugins such as Flash, Silverlight, JavaFX, SVG,VML • VML (Vector Markup Language) only works in IE • SVG, IE support since 9+ New Way • <canvas> element, lacks border and content by default • JavaScript 2D API Browser Support IE9+, Modern Browser Older IEs - use explorercanvas.js (emulates Canvas via VML) WebGL 3D API - Full support in Chrome onlySaturday, October 6, 12
  29. 29. HTML5 - Canvas Markup Operations Context, Transformation, Pixel Manipulation, Compositing, Image Drawing, Text, Path, Rectangles, Colors, Shadows, Styles Scripting http://www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.pngSaturday, October 6, 12
  30. 30. HTML5 - Canvas | SVG Coolness www.chromeweblab.com Canvas developer.mozilla.org/en-US/demos/tag/tech:canvas threejs.org (webgl) hakim.se/experiments SVG raphaeljs.com d3js.org paperjs.org/about Canvas or SVG www.sitepoint.com/how-to-choose-between-canvas-and-svgSaturday, October 6, 12
  31. 31. HTML5 - Media Elements Audio & Video tags • Modern Browser, IE9+ • Codecs support not uniform • Polyfill - audio.js, videojs.com • Audio Codecs: Ogg, Mp3, Wav, Aac • Video Codecs: H.264 (mp4), Ogg (ogv),VP8 (webm) <source> multiple occurrences allowed <track> caption tracks. not implemented yet <embed> external pluginsSaturday, October 6, 12
  32. 32. HTML5 - Media - videojs.comSaturday, October 6, 12
  33. 33. HTML5 - Polyfills, shims Audience Old IEs and modern browser Solutions • Modernizr - Normalized feature detector • html5shim • FlashCanvas, JebGL, GCF, socket.io, css3pie, amplifyjs • GCF - Google Chrome Frame Caveats Not everything can be detected Performance (jsPerf.com, yepnope.js)Saturday, October 6, 12
  34. 34. HTML5 - Status - Use or not? *Image Credit: WikipediaSaturday, October 6, 12
  35. 35. HTML5 - Status - Use or not? *Image Credit: coolgraphic.orgSaturday, October 6, 12
  36. 36. HTML5 - Resources diveintohtml5.info | modernizr.com | iewebgl.com | videojs.com caniuse.com | html5test.com | mobilehtml5.org | quirksmode.org html5rocks.com | http://coding.smashingmagazine.com/2011/11/18/ html5-semantics/ html5demos.com html5doctor.com html5boilerplate.com developer.mozilla.org/en-US/docs/HTML/HTML5 craftyjs.com www.cuttherope.ie/dev/ www.infoq.com/presentations/Angry-Birds-on-HTML5 ishtml5readyyet.comSaturday, October 6, 12
  37. 37. HTML5 - References diveintohtml5.info html5rocks.com html5doctor.com developer.mozilla.org/en-US/docs/HTML/HTML5Saturday, October 6, 12
  38. 38. Q &ASaturday, October 6, 12

×