Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Infotech 2013: HTML5 Deep Dive

Infotech 2013: HTML5 Deep Dive

Presentation discussing features of HTML5 and a number of resources.

Avatar for Dustin Tauer

Dustin Tauer

April 16, 2013

Other Decks in Technology

Transcript

  1. Dustin Tauer Developer (12 years) Instructor (8 years) Web ::

    Mobile :: eLearning http://codepen.io/dtauer http://twitter.com/dtauer http://speakerdeck.com/dtauer
  2. Easel Solutions • Training – Design, Web, Mobile, eLearning, Strategy,

    Social, etc. • Customized Training • Consulting • Adobe Connect We like finding solutions
  3. Topics • HTML5 Features & Examples • The Real World

    – Feature Testing – Fallback • Resources
  4. Semantic Distinctions <section /> clarifies <div /> <article /> replaces

    <div id=“content”> <aside /> replaces <div id=“sidebar”>
  5. Local storage • Client-side database – Key-value notation (JSON) •

    Stored in users browsers – 5 MB (per domain) • The data persists – After the browser is shutdown or session is closed window.localStorage.setItem('value', someValue);
  6. Session storage • Just like Local storage but data expires

    once browser window is closed – Still client-side
  7. IndexedDB • WebSQL is deprecated. • IndexedDB is an object

    store var idbRequest = window.indexedDB.open('Database Name'); idbRequest.onsuccess = function(event) { var db = event.srcElement.result; var transaction = db.transaction([], IDBTransaction.READ_ONLY); var curRequest = transaction.objectStore('ObjectStore Name').openCursor(); curRequest.onsuccess = ...; }; http://www.html5rocks.com/en/tutorials/indexeddb/todo/
  8. Application Cache (offline apps) • Offline First • Cache manifest

    (*.appcache => file) • Load from local cache (HTML, CSS, JS and images) • mimetype: text/cache-manifest • 5MB (chrome = unlimited storage) • window.applicationCache http://proofwhisky.com/
  9. Webworkers (multi-threading) App.js: var worker = new Worker(“Thread.js”); worker.onmessage =

    function(event) { alert(event.data); }; worker.postMessage('data'); Thread.js: self.onmessage = function(event) { // Do some work. self.postMessage("recv'd:"+event.data); };
  10. Video <video controls width="500"> <source src="video.mp4" type="video/mp4" /> <source src="video.ogg"

    type="video/ogg" /> <embed src="your_flash_file" type="application/x-shockwave-flash" width="1024" height="798" allowscriptaccess="always" allowfullscreen="true"></embed> </video>
  11. Graphics & 3D • SVG – Resolution • Canvas Element

    – Graphics created with JavaScript • WebGL – http://helloracer.com/webgl/ – http://flashvhtml.com
  12. Many More • File Access • Sockets • Connectivity •

    Device Access – Geo-location, Camera/Micorphone, Contacts/Events, Orientation, Notifications, etc…
  13. CSS3 • Transitions • Animations • Transforms • Gradients •

    Rounded corners • Flexible Box Model • Multi-column • Webfonts • Text wrapping • Columns • Opacity • Backgrounds • CSS selectors • Shadows
  14. Modernizr: CSS http://modernizr.com/ Chrome: <html class="js opacity cssanimations csscolumns …">

    IE 7: <html class="js no-opacity no-cssanimations …"> .opacity .button { background:#000; opacity: 0.75; } .no-opacity .button { background: #444; }
  15. Modernizr: JavaScript http://modernizr.com/ if (Modernizr.canvas){ // Create canvas object and

    get drawing } else { // No canvas support. } ------------------------- Modernizr.load({ test: Modernizr.geolocation, yep : 'geo.js', nope: 'geo-polyfill.js‘ });
  16. Shiv or Shim • Recognize the capabilities of your users

    – http://caniuse.com • Fallback support for unsupported features – http://html5please.com Shivs and Shims are the same thing!
  17. Resources • All your HTML5 needs – http://w3schools.com/html/html5_intro.asp – http://html5rocks.com/en/

    • jQuery: HTML5 now! – http://jquery.com • Need animation? – Designers: Adobe Edge Animate – Developers: http://greensock.com
  18. Resources • PhoneGap – Compile HTML/CSS/JavaScript to native mobile applications

    – iOS, Android, Windows Phone, Blackberry, etc • PhoneGap Build: – Hosted, 10MB limit http://www.phonegap.com