HTML5 From the Front Lines What to embrace today (and what to avoid)

Slides:



Advertisements
Similar presentations
1
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module D (Office 2007 Version) Decision Analysis.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 4 Computing Platforms.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Myra Shields Training Manager Introduction to OvidSP.
Writing Pseudocode And Making a Flow Chart A Number Guessing Game
HTML5 for Data Visualisation
Introduction to HTML, XHTML, and CSS
Mike Scott University of Texas at Austin
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Photo Slideshow Instructions (delete before presenting or this page will show when slideshow loops) 1.Set PowerPoint to work in Outline. View/Normal click.
Lost in Translation Measuring and Managing GOOD Web Intentions Marilyn Harmacek. 1.
Slice and Dice: From PSD Image to XHTML+CSS Svetlin Nakov Telerik Corporation
22 мая 2013, Киев Построение Windows 8 приложений для доступа к SharePoint 2013 Бельский Сергей.
1 Laying Out Pages with Tiles Source :
Anything But Typical Learning to Love JavaScript Prototypes Page 1 © 2010 Razorfish. All rights reserved. Dan Nichols March 14, 2010.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
Svetlin Nakov Telerik Corporation
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Creating a WordPress Website Oklahoma Conference of The UMC Department of Communications 1.
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Modernize Your Old Browser to Support HTML 5 Svetlin Nakov Telerik Software Academy academy.telerik.com Senior Technical Trainer
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Services Course Windows Live SkyDrive Participant Guide.
Services Course Windows Live Spaces + Windows Live Writer Participant Guide.
Middlesex University CMT3342 (2013) Group 2 Computing Project Management Final report-Presentation
SLP – Endless Possibilities What can SLP do for your school? Everything you need to know about SLP – past, present and future.
HTML5 Overview HOANGPT2. 1. General 2. New Elements List 3.
What is HTML5…?. ”…removes the need for plugins” ”…can handle multimedia directly” ”…enables rich, interactive clients” ”…enables advanced visual designs”
Speak Up for Safety Dr. Susan Strauss Harassment & Bullying Consultant November 9, 2012.
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Essential Cell Biology
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Chapter 13 Web Page Design Studio
Energy Generation in Mitochondria and Chlorplasts
New Tags, New Attributes, New JavaScript APIs, Forms, Validation, Audio, Video, SVG, Canvas Doncho Minkov Telerik Corporation
2 History of World-Wide Web and HTML  1989: WWW has been invented at CERN  1991: Official birthday of HTML.
A Brief Introduction to HTML5. 2 © COPYRIGHT 2011 SAPIENT CORPORATION | CONFIDENTIAL Bio Rob Larsen Rob Larsen has more than 12 years’ experience as a.
HTML 5. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML came in The web has changed.
HTML5 and Mobile Web Application Development. Bio 12+ years HTML/CSS/JavaScript. Focused on those technologies since 1999 Interface Architect at Isobar.
HTML 5 Tutorial Chapter 1 Introduction. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML.
Lecture 18. HTML5 and JavaScript Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell Exploring the Internet,
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
Evaluation of HTML5 Graphics for Data Structure Visualization
HTML5 Accessibility Ted Drake, Yahoo! Accessibility Lab Slideshare.net/7mary4.
Congratulations! You are part of a global community of thousands of web developers who attend Web Camps to keep their web development skills up-to-date.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
UPLOAD / DOWNLOAD april  HTML5 is just the next iteration of HTML  Previous version was technically HTML 4.01, which incorporated XHTML 1.0.
HTML 5 The Future of Web Development. What is HTML5? “HTML5 is a specification of how the web’s core language, HTML, should be formatted and utilized.
HTML5 Requirement Driven Design David Tarrant Electronics and Computer Science.
The HTML5 logo was introduced by W3C in 2010
Chapter 17 The Need for HTML 5.
HTML5 – The Saga Continues
Introduction to HTML5.
HTML 5 Tutorial Chapter 1 Introduction.
Application with Cross-Platform GUI
Chasing the evolving web
Giuseppe Attardi Università di Pisa
Presentation transcript:

HTML5 From the Front Lines What to embrace today (and what to avoid)

2 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Agenda I. HTML5 and the Web Platform II. High Level HTML5 Strategy III. Working With HTML5 Today IV. Conclusion

3 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL I. HTML5 and the Web Platform

4 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL What is HTML5?

5 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL What is HTML5? "HTML5 is anything you want it to be as long as it's new and cool. – Peter Paul Koch

6 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL The Web Platform o HTML5 New Semantic elements Video and audio Form elements and input types Offline Web Applications o Related Technologies SVG Canvas Geolocation Web Storage WebSocket WebGL o EcmaScript, 5th Edition (ES5) o CSS3 2D Transforms 3D Transforms CSS Animations CSS Transitions o More…

7 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Add It All Up

8 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL What Does That Really Mean? Much better tools for developing and deploying rich, interactive applications over the web

9 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL What Does the Future Look Like?

10 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL II. High Level HTML5 Strategy

11 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Set Reasonable Support Targets and Communicate This is as important for legacy browsers as it is for the latest/greatest desktop or mobile browsers On the desktop, older versions of IE will never work as well as the latest Chrome or Firefox o Some things just arent going to be worth the effort for wide support. Set expectations early On Mobile Be very specific about the devices youre going to support o Plan to buy the devices o Webkit doesnt mean the same thing on every device

12 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL REMEMBER Your site or app doesnt have to be exactly the same in every browser o The only people who check a site in more than one browser are the people building it o Your customers will check on Desktop + mobile device(s), but theyre used to different experiences on the Desktop and mobile web

13 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Use Modernizr

14 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Use Modernizr They say: o Modernizr is the right micro-library to get you up and running with HTML5 & CSS3 today. o Allows for scripting and styling of new HTML5 elements in older versions of IE o Tests for over 40 emerging web features o Creates Modernizr JS Object that contains the results of these tests as Boolean properties (e.g. if (Modernizr.geolocation) { … }) o Adds classes to the html element that expose what features are and are not supported (e.g..canvas and.no-canvas) Doesnt actually add any functionality. No matter what the name implies.

15 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL (Really) Use Modernizr Some people include Modernizr and all they actually use it for is supporting new HTML5 elements in old versions of Internet Explorer o If thats all you need, use the HTML5Shiv/m: article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary subline time Leave the rest of the code at home The CSS classes and the Modernizr JavaScript object are much more important when using emerging technologies

16 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL The Final Piece: Cross Browser Polyfills Polyfills? Code that brings new/exciting technology to older/non- compliant browsers This is where the modernizing happens The people who write these are heroes Heres a big list: o browser-Polyfills browser-Polyfills

17 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL From the Front Lines Part one: Technologies in Depth

18 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL About This Section Introduce the feature Support (thanks to caniuse.com) Verdict & Polyfills

19 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL New Semantic Elements Examples: Header, Footer, Section, and Aside o Based on common usage patterns found during a web census conducted by editor Ian Hickson, etc. becomes and Others like hgroup, mark, time, and figure were logical additions Supported in all browsers except IE6,7,8- owing to the way unknown HTML elements are handled

20 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL New Semantic Elements : Verdict and Polyfills Its worth it now. Every site Ive built over the past two+ years has used the new semantic/structural elements. Use: Modernizr or the HTML5 Shim(v) InnerShiv for dynamic content in IE jQuery 1.7 wraps an optimized dynamic solution into the core

21 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Canvas 2D API The Canvas 2D context provides a scriptable interface for drawing two-dimensional images and bitmaps in the browser One of the earliest stars of the HTML5 era- this got people really excited about what was possible with HTML5 Supported in all major browsers except IE 6, 7, 8 Great for games, charts, intense visualizations, infographics…

22 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Canvas 2D API Canvas in Action The Wired Mind: Canvas Rider Flotr2

23 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Canvas 2D API: Verdict and Polyfills With the understanding that there will be performance issues with more dynamic Canvas animations and games (and in older versions of IE) you can use Canvas right now. Use: Flash Canvas supports 70% of the Canvas spec

24 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Geolocation The Geolocation API is a standard interface for retrieving the geographical location of a device It adds a sense of place to your app Supported in all major browsers except IE6, 7, 8 and Safari 3.2 and 4.0

25 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Geolocation Geolocation in Action o WikiHere o Twitter/Meetup Demo

26 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Geolocation: Verdict and Polyfills With design fallbacks and the available polyfill techniques geolocation can be used today Polyfills and design arent as good as device GPS, but they can do the job Use: From WebShims o ation.js ation.js

27 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Audio/Video Playing audio and video in the browser is such a common event that it's easy to forget that, for most of the history of the web, there was no native method for doing so Enter the new HTML5 audio and video elements From a specification perspective, the inclusion of browser-native APIs for playing audio and video is straightforward. Anyone familiar with the way the replaced elements like IMG work will understand how to embed video and audio. Theres a tag, a source and some attributes With methods like play() and pause() the basics of the API are pretty easy to pick up

28 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Audio/Video: the Code your browser does not support the video tag //the JavaScript var video = document.getElementById("video-sample"), toggle = document.getElementById("video-toggle"); toggle.onclick = function() { if (video.paused) { video.play(); toggle.className="playing" } else { video.pause(); toggle.className="paused" } };

29 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Audio/Video: Support Supported in all major browsers except IE6,7,8 and Safari 3.2 Up until March of this year, the support story was convoluted by questions of video and audio formats. This is simplified now since Mozilla has decided to support h.264, the dominant video codec for HTML5 video.

30 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Audio/Video: Verdict and Polyfills People that serve video for a living have put together solutions that will work on any device seamlessly. Use them. There are also nice solutions if you want to go it alone MediaElement.js o Uses, flash, silverlight Video.js o Built on an older pattern called Video for Everybody, Video.js adds more device support with JavaScript

31 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Audio/Video: Verdict and Polyfills Audio follows a similar support strategy (Flash fallback) SoundManager2 jPlayer

32 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Web Storage The Web Storage specification defines an API for persistent data storage of key-value pairs in web browsers. This specification is similar to, but greatly improves upon, the functionality currently offered by cookies. o Cookies Cookies are limited to 4k WebStorage is 500MB or more. We try to avoid cookies for performance. Web storage removes the cookie overhead on every request Cookies are annoying to code. Ive been doing this for a long time and I only tolerate them.

33 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Web Storage Storage takes two forms: sessionStorage and localStorage. o Each provides similar methods for managing items ( setItem(), removeItem(), and getItem() ) and for clearing the entire storage ( clear() ). o Session storage is designed to hold information for just the current browsing session. o Local storage is meant for longer-term storage of site preferences or other user data. Supported in all major browsers except IE6,7

34 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Web Storage: Verdict and Polyfills The support landscape is good and there are multiple polyfill options storage polyfill Amplify.js PersistJS (not a poyfill, but offers support all the way back to browsers from the 1990s.)

35 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL From the Front lines Part Two: The Bonus Round

36 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Bonus Round: WebGL The Web-based Graphics Library (WebGL) enhances JavaScript with the ability to create interactive, three-dimensional graphics in the browser. WebGL is a context of the canvas HTML element. (More) WebGL in Action: chuclone

37 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Bonus Round: WebGL WebGL is very exciting, BUT… Theres no hint of support in Internet Explorer o For older versions the polyfill path translates the 3d context of WebGL to Canvas 2D API and then would use Flash Canvas or Excanvas to render o Theres also a commercial plugin for Internet Explorer Even supporting browsers require up-to-date drivers and decent hardware o No mobile support o hardware-acceleration/ hardware-acceleration/

38 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Bonus Round: SVG Probably the strangest technology to be roped into the HTML5 catch-all is Scalable Vector Graphics (SVG.) SVG is a vector graphics grammar defined in XML. The SVG specification has been under development by the W3C since 1999, so including it as either "new" or part of HTML5 is a stretch. But yet… people do. Still, newfound excitement for SVG is justified as there's now some real traction for the standard. + Raphael.js. o Aside: SVG Objects are DOM Objects. That makes them easier to script. Biggest problem right now is lack of support in Android < 2.3

39 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Bonus Round: SVG SVG in Action HighCharts: D3:

40 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Bonus Round: CSS3 A new, modular approach to CSS specifications Not as fast moving as the HTML working group Mature Modules o Selectors o Color o Backgrounds and Borders o Multi-column layout o Media Queries New and In-Development Modules o CSS Fonts Module Level 3 o CSS 2D Transforms Module Level 3 o CSS 3D Transforms Module Level 3 o CSS Animations Module Level 3 and CSS Transitions Module Level 3

41 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Bonus Round: CSS3 CSS3 can be used in two ways: Polyfills and filters for non-compliant browsers Performance cost! Design graceful degradation You can try many CSS3 features out with Also:

42 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL CONCLUSION

43 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Conclusion 1. Armed with knowledge and a plan for support across devices and browser, many of these technologies can be used today 2. Make cool sites and apps 3. Have fun!

44 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL

45 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Contact Rob Larsen github: github.com/roblarsen HTML + CSS + JavaScript

46 © COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Thank You!