HTML5, are we there yet?

Ovidiu Dimulescu
Ovidiu DimulescuSecurity Engineering, Oracle Cloud at Oracle
HTML5, are we there yet?
                            Jax CodeCamp, Oct 2012

                                Ovidiu Dimulescu




Saturday, October 6, 12
Agenda
                      •   What is HTML5?
                      •   Features
                      •   Polyfills and shims
                      •   Status
                      •   Resources
                      •   Q&A




Saturday, October 6, 12
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 meetup




Saturday, October 6, 12
What is   ?




Saturday, October 6, 12
HTML- A bit of history




         * Credit evolutionofweb.appspot.com


Saturday, October 6, 12
HTML- A bit of history




         * Credit evolutionofweb.appspot.com


Saturday, October 6, 12
HTML- A bit of history




         * Credit evolutionofweb.appspot.com


Saturday, October 6, 12
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 app



Saturday, October 6, 12
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 things



Saturday, October 6, 12
HTML5- Features




Saturday, October 6, 12
HTML5- Document Structure




Saturday, October 6, 12
HTML5 - Semantic Tags




Saturday, October 6, 12
HTML5 - Semantic Tags




                                                    No DIV !?




         *Image Credit: indianlakes.wordpress.com

Saturday, October 6, 12
HTML5 - Semantic Tags




                                                       Text




            *Credit: www.w3.org/wiki/HTML_structural_elements

Saturday, October 6, 12
HTML5 - Semantic Tags




            *Credit: www.w3.org/wiki/HTML_structural_elements

Saturday, October 6, 12
HTML5 - Semantic Tags




            *Credit: www.w3.org/wiki/HTML_structural_elements

Saturday, October 6, 12
HTML5 - Semantic Tags




            *Credit: www.w3.org/wiki/HTML_structural_elements

Saturday, October 6, 12
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
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, output



Saturday, October 6, 12
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
HTML5 - Forms - Status




                          wufoo.com/html5




Saturday, October 6, 12
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
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 manifest's URI

         See appcachefacts.info for various quirks
Saturday, October 6, 12
HTML5 - Offline Apps - Cache




        *Credit: marakana.com/bookshelf/html5_tutorial/offline_applications.html

Saturday, October 6, 12
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 browsers
Saturday, October 6, 12
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
HTML5 - Geolocation




Saturday, October 6, 12
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 only



Saturday, October 6, 12
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.png



Saturday, October 6, 12
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-svg



Saturday, October 6, 12
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 plugins



Saturday, October 6, 12
HTML5 - Media - videojs.com




Saturday, October 6, 12
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
HTML5 - Status - Use or not?




        *Image Credit: Wikipedia

Saturday, October 6, 12
HTML5 - Status - Use or not?




        *Image Credit: coolgraphic.org

Saturday, October 6, 12
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.com
Saturday, October 6, 12
HTML5 - References
             diveintohtml5.info
             html5rocks.com
             html5doctor.com
             developer.mozilla.org/en-US/docs/HTML/HTML5




Saturday, October 6, 12
Q &A




Saturday, October 6, 12
1 of 38

Recommended

Play by
PlayPlay
PlayBasav Nagur
971 views132 slides
Html5 by
Html5Html5
Html5sree1111
266 views14 slides
Html5 with SharePoint 2010 by
Html5 with SharePoint 2010Html5 with SharePoint 2010
Html5 with SharePoint 2010Hemant Joshi
6.9K views30 slides
Drupal 8 - Build Week Update by
Drupal 8 - Build Week UpdateDrupal 8 - Build Week Update
Drupal 8 - Build Week UpdateAngela Byron
1.5K views22 slides
HTML5 Overview (Silicon Valley User Group) by
HTML5 Overview (Silicon Valley User Group)HTML5 Overview (Silicon Valley User Group)
HTML5 Overview (Silicon Valley User Group)robinzimmermann
633 views78 slides
2012 - HTML5, CSS3 and jQuery with SharePoint 2010 by
2012 - HTML5, CSS3 and jQuery with SharePoint 20102012 - HTML5, CSS3 and jQuery with SharePoint 2010
2012 - HTML5, CSS3 and jQuery with SharePoint 2010Chris O'Connor
1.1K views41 slides

More Related Content

What's hot

JavaScript Libraries (Ajax Exp 2006) by
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
3.1K views62 slides
Html5 more than just html5 v final by
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v finalLohith Goudagere Nagaraj
562 views32 slides
Html5 coredevsummit by
Html5 coredevsummitHtml5 coredevsummit
Html5 coredevsummitJen Simmons
553 views18 slides
Html5 Brown Bag by
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bagstuplum
401 views43 slides
Html5 shubelal by
Html5 shubelalHtml5 shubelal
Html5 shubelalShub
653 views55 slides
Fosdem 2009 – improving drupal's page loading performance by
Fosdem 2009 – improving drupal's page loading performanceFosdem 2009 – improving drupal's page loading performance
Fosdem 2009 – improving drupal's page loading performanceErup Enolc
588 views61 slides

What's hot(13)

JavaScript Libraries (Ajax Exp 2006) by jeresig
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
jeresig3.1K views
Html5 coredevsummit by Jen Simmons
Html5 coredevsummitHtml5 coredevsummit
Html5 coredevsummit
Jen Simmons553 views
Html5 Brown Bag by stuplum
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
stuplum401 views
Html5 shubelal by Shub
Html5 shubelalHtml5 shubelal
Html5 shubelal
Shub653 views
Fosdem 2009 – improving drupal's page loading performance by Erup Enolc
Fosdem 2009 – improving drupal's page loading performanceFosdem 2009 – improving drupal's page loading performance
Fosdem 2009 – improving drupal's page loading performance
Erup Enolc588 views
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re... by Jesse Cravens
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Client Server 3.0 - 6 Ways JavaScript is Revolutionizing the Client/Server Re...
Jesse Cravens5.4K views
Drupal content editor flexibility by hernanibf
Drupal content editor flexibilityDrupal content editor flexibility
Drupal content editor flexibility
hernanibf1.3K views
Drupal architectures for flexible content - Drupalcon Barcelona by hernanibf
Drupal architectures for flexible content - Drupalcon BarcelonaDrupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon Barcelona
hernanibf1.3K views
HTML 5 Fundamental by Lanh Le
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 Fundamental
Lanh Le969 views
Total Browser Pwnag3 V1.0 Public by Rafal Los
Total Browser Pwnag3   V1.0 PublicTotal Browser Pwnag3   V1.0 Public
Total Browser Pwnag3 V1.0 Public
Rafal Los1.9K views

Viewers also liked

Module 6 lesson 8 by
Module 6 lesson 8Module 6 lesson 8
Module 6 lesson 8Erik Tjersland
167 views10 slides
Evaltion for adam by
Evaltion for adamEvaltion for adam
Evaltion for adamthisismatt
100 views4 slides
Evaltion for adam v by
Evaltion for adam vEvaltion for adam v
Evaltion for adam vthisismatt
109 views4 slides
Plan tic 9_a by
Plan tic 9_aPlan tic 9_a
Plan tic 9_aBianca Yisseth Montes Jimenez
119 views15 slides
Evaluation question 2 by
Evaluation question 2Evaluation question 2
Evaluation question 2Fatima B
228 views9 slides
cert (18) by
cert (18)cert (18)
cert (18)Kessie Stevens
92 views1 slide

Similar to HTML5, are we there yet?

HTML5--The 30,000' View (A fast-paced overview of HTML5) by
HTML5--The 30,000' View (A fast-paced overview of HTML5)HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)Peter Lubbers
55.9K views142 slides
Top 10 HTML5 Features for Oracle Cloud Developers by
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud DevelopersBrian Huff
704 views33 slides
Local Storage for Web Applications by
Local Storage for Web ApplicationsLocal Storage for Web Applications
Local Storage for Web ApplicationsMarkku Laine
1.5K views32 slides
HTML5 Webinar - Mind Storm Software by
HTML5 Webinar - Mind Storm SoftwareHTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareRomin Irani
759 views22 slides
HTML5のご紹介 by
HTML5のご紹介HTML5のご紹介
HTML5のご紹介yoshikawa_t
1.9K views41 slides
HTML5, CSS3 and the Future of the Web by
HTML5, CSS3 and the Future of the WebHTML5, CSS3 and the Future of the Web
HTML5, CSS3 and the Future of the WebBerg Brandt
538 views12 slides

Similar to HTML5, are we there yet?(20)

HTML5--The 30,000' View (A fast-paced overview of HTML5) by Peter Lubbers
HTML5--The 30,000' View (A fast-paced overview of HTML5)HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)
Peter Lubbers55.9K views
Top 10 HTML5 Features for Oracle Cloud Developers by Brian Huff
Top 10 HTML5 Features for Oracle Cloud DevelopersTop 10 HTML5 Features for Oracle Cloud Developers
Top 10 HTML5 Features for Oracle Cloud Developers
Brian Huff704 views
Local Storage for Web Applications by Markku Laine
Local Storage for Web ApplicationsLocal Storage for Web Applications
Local Storage for Web Applications
Markku Laine1.5K views
HTML5 Webinar - Mind Storm Software by Romin Irani
HTML5 Webinar - Mind Storm SoftwareHTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm Software
Romin Irani759 views
HTML5のご紹介 by yoshikawa_t
HTML5のご紹介HTML5のご紹介
HTML5のご紹介
yoshikawa_t1.9K views
HTML5, CSS3 and the Future of the Web by Berg Brandt
HTML5, CSS3 and the Future of the WebHTML5, CSS3 and the Future of the Web
HTML5, CSS3 and the Future of the Web
Berg Brandt538 views
Introduction to HTML5 and CSS3 (revised) by Joseph Lewis
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
Joseph Lewis10.6K views
Html5 Application Security by chuckbt
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
chuckbt2.2K views
The Mobile Web - HTML5 on mobile devices by Wesley Hales
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devices
Wesley Hales801 views
HTML Semantic Tags by Bruce Kyle
HTML Semantic TagsHTML Semantic Tags
HTML Semantic Tags
Bruce Kyle2.8K views
HTML5 History & Features by Dave Ross
HTML5 History & FeaturesHTML5 History & Features
HTML5 History & Features
Dave Ross868 views
Rapid Application Development on Google App Engine for Java by Kunal Dabir
Rapid Application Development on Google App Engine for JavaRapid Application Development on Google App Engine for Java
Rapid Application Development on Google App Engine for Java
Kunal Dabir5.2K views
HTML5: An Overview by Nagendra Um
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
Nagendra Um2.8K views
In-browser storage and me by Jason Casden
In-browser storage and meIn-browser storage and me
In-browser storage and me
Jason Casden4.8K views
HTML5: An Introduction To Next Generation Web Development by Tilak Joshi
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi2.6K views
Html5 today by Roy Yu
Html5 todayHtml5 today
Html5 today
Roy Yu825 views
HTML5 Accessibility by User Vision
HTML5 AccessibilityHTML5 Accessibility
HTML5 Accessibility
User Vision1.4K views

More from Ovidiu Dimulescu

Microservices - Yet another buzzword by
Microservices - Yet another buzzwordMicroservices - Yet another buzzword
Microservices - Yet another buzzwordOvidiu Dimulescu
789 views49 slides
Threads Needles Stacks Heaps - Java edition by
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionOvidiu Dimulescu
4.2K views70 slides
Journeyman to Master by
Journeyman to MasterJourneyman to Master
Journeyman to MasterOvidiu Dimulescu
501 views43 slides
The Rise of DevOps by
The Rise of DevOpsThe Rise of DevOps
The Rise of DevOpsOvidiu Dimulescu
550 views33 slides
Hadoop on Azure, Blue elephants by
Hadoop on Azure,  Blue elephantsHadoop on Azure,  Blue elephants
Hadoop on Azure, Blue elephantsOvidiu Dimulescu
1.4K views39 slides
Git for Windows by
Git for WindowsGit for Windows
Git for WindowsOvidiu Dimulescu
2.4K views30 slides

Recently uploaded

Voice Logger - Telephony Integration Solution at Aegis by
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at AegisNirmal Sharma
17 views1 slide
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
15 views15 slides
Perth MeetUp November 2023 by
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023 Michael Price
15 views44 slides
6g - REPORT.pdf by
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdfLiveplex
9 views23 slides
virtual reality.pptx by
virtual reality.pptxvirtual reality.pptx
virtual reality.pptxG036GaikwadSnehal
11 views15 slides
SAP Automation Using Bar Code and FIORI.pdf by
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdfVirendra Rai, PMP
19 views38 slides

Recently uploaded(20)

Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab15 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex9 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada121 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software225 views
Empathic Computing: Delivering the Potential of the Metaverse by Mark Billinghurst
Empathic Computing: Delivering  the Potential of the MetaverseEmpathic Computing: Delivering  the Potential of the Metaverse
Empathic Computing: Delivering the Potential of the Metaverse
Mark Billinghurst470 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2216 views
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
handbook for web 3 adoption.pdf by Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex19 views

HTML5, are we there yet?

  • 1. HTML5, are we there yet? Jax CodeCamp, Oct 2012 Ovidiu Dimulescu Saturday, October 6, 12
  • 2. Agenda • What is HTML5? • Features • Polyfills and shims • Status • Resources • Q&A Saturday, October 6, 12
  • 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 meetup Saturday, October 6, 12
  • 4. What is ? Saturday, October 6, 12
  • 5. HTML- A bit of history * Credit evolutionofweb.appspot.com Saturday, October 6, 12
  • 6. HTML- A bit of history * Credit evolutionofweb.appspot.com Saturday, October 6, 12
  • 7. HTML- A bit of history * Credit evolutionofweb.appspot.com Saturday, October 6, 12
  • 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 app Saturday, October 6, 12
  • 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 things Saturday, October 6, 12
  • 12. HTML5 - Semantic Tags Saturday, October 6, 12
  • 13. HTML5 - Semantic Tags No DIV !? *Image Credit: indianlakes.wordpress.com Saturday, October 6, 12
  • 14. HTML5 - Semantic Tags Text *Credit: www.w3.org/wiki/HTML_structural_elements Saturday, October 6, 12
  • 15. HTML5 - Semantic Tags *Credit: www.w3.org/wiki/HTML_structural_elements Saturday, October 6, 12
  • 16. HTML5 - Semantic Tags *Credit: www.w3.org/wiki/HTML_structural_elements Saturday, October 6, 12
  • 17. HTML5 - Semantic Tags *Credit: www.w3.org/wiki/HTML_structural_elements Saturday, October 6, 12
  • 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. 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, output Saturday, October 6, 12
  • 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. HTML5 - Forms - Status wufoo.com/html5 Saturday, October 6, 12
  • 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. 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 manifest's URI See appcachefacts.info for various quirks Saturday, October 6, 12
  • 24. HTML5 - Offline Apps - Cache *Credit: marakana.com/bookshelf/html5_tutorial/offline_applications.html Saturday, October 6, 12
  • 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 browsers Saturday, October 6, 12
  • 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
  • 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 only Saturday, October 6, 12
  • 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.png Saturday, October 6, 12
  • 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-svg Saturday, October 6, 12
  • 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 plugins Saturday, October 6, 12
  • 32. HTML5 - Media - videojs.com Saturday, October 6, 12
  • 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. HTML5 - Status - Use or not? *Image Credit: Wikipedia Saturday, October 6, 12
  • 35. HTML5 - Status - Use or not? *Image Credit: coolgraphic.org Saturday, October 6, 12
  • 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.com Saturday, October 6, 12
  • 37. HTML5 - References diveintohtml5.info html5rocks.com html5doctor.com developer.mozilla.org/en-US/docs/HTML/HTML5 Saturday, October 6, 12