Practical HTML5
Maurice de Beijer
Who am I?
•
•
•
•
•
•
•
•

Maurice de Beijer
The Problem Solver
Microsoft Integration MVP
DevelopMentor instructor
Twitter:
@mauricedb
Blog:
http://msmvps.com/blogs/theproblemsolver/
Web:
http://www.HTML5Support.nl
E-mail:
mauricedb@develop.com

2
What are we going to cover?
•
•
•
•
•
•

Polyfills
Semantic elements
WebSockets
Drag/Drop
Graphics
Storing data in the browser

• Demos at: http://bit.ly/lph5

3
Polyfills
• Not every browser supports every HTML5 feature
– Especially true with old browsers
• Many missing features can be added using a polyfill
– Offers the standard API
– Often done in JavaScript
– JavaScript is slow in older browsers 
• A few good lists to check
– Modernizr HTML5 Cross Browser Polyfills
– HTML5 please

4
HTML5 Semantic elements
• New HTML5 elements
– <nav>
– <section>
– <header>
– <footer>
– <article>
– <aside>

5
HTML5 Semantic elements
• How about support?

6
HTML5 Semantic elements
• Why use them?
– Searchability
– Accessibility
• Neither really makes sense
– Search engines don’t really care
– Use WAI-ARIA for accessibility support
• Make sure to add support in older versions of IE
– Modernizr
– Html5Shiv

7
HTML5 Semantic elements
• The new HTML5 input elements
– <input type="email"/>
– <input type="number"/>
– <input type="url"/>
– <input type="date"/>
– <input type="datetime"/>
– <input type="month"/>
– <input type="week"/>
– …..
• Support is not very good, only really useful on mobile devices

8
HTML5 Semantic elements
• Other more useful HTML5 elements
– <video>
– <audio>
– <meter>
– <progress>
– <time>

9
WebSockets
• A bi-directional socket connection
– Between a web browser and the web server
• The server can push updates to the browser
– Refreshing the browser to see updates is so 2012 
• Not just for games and chat applications
– Any application where you want fast updates
– Decrease the chance of concurrency issues

10
WebSockets
• How about support?

11
WebSockets
• Suffers from lack of infrastructure support
– Routers and firewalls can cause issues
• The API is low level
– Messages are just simple objects
– You might need to retransmit missed messages
• Use ASP.NET SignalR
– Uses WebSockets if possible
– Otherwise it uses fallbacks like Comet
– Supports scale out scenarios
– Uses a very simple API
• Using Node.js?
– Use Socket.IO instead

12
Drag and Drop
• Drag and drop can be a very intuitive user interaction
– Often seen as more fun by users
• Very common interaction on tablets
– But works equally well with a mouse
• HTML5 supports drag and drop
– Including dragging from the file system

13
Drag and Drop
How about support?

14
Drag and Drop
• Use jQuery UI instead of the HTML5 capabilities
– Use jQuery UI Touch Punch for touch support
– Add -ms-touch-action: none in CSS for Windows 8

15
Graphics
• Rich graphics are common in modern applications
– Interactive graphics
– Charts
• Often generated on the client
– Not just images downloaded from the server
• Two basic options
– Scalable Vector Graphics
– Canvas

16
Comparison of Canvas and SVG
Canvas

SVG

Pixel-based (canvas is essentially an image
element with a drawing API)

Object Model-based (SVG elements are
similar to HTML elements)

Single HTML element similar to <img> in
behavior

Multiple graphical elements which become
part of the Document Object Model (DOM)

Visual presentation created and modified
programmatically through script

Visual presentation created with markup and
modified by CSS or programmatically
through script

Event model/user interaction is coarse—at
the canvas element only; interactions must be
manually programmed from mouse
coordinates
API does not support accessibility; markupbased techniques must be used in addition to
canvas

Event model/user interaction is object-based
at the level of primitive graphic elements—
lines, rectangles, paths
SVG markup and object model directly
supports accessibility

17
SVG
• How about support?

18
Canvas
• How about support?

19
Graphics
• Use a library to make the API easier
– Don’t worry about Canvas versus SVG
• jqPlot is great for charts
– It uses canvas
– Includes exCanvas for IE 7/8 support
• Raphaël is a great choice for general graphics
– It uses SVG
– Uses VML for IE 7/8 support

20
Storing data in the browser

21
IndexedDB
• How about support?

22
LocalStorage
• How about support?

23
Storing data in the browser
• LocalStorage is well supported
– Except in very old versions of IE
• IndexedDB is much more powerful
– But the API is hard to use
• Lawnchair is easy to use
– Abstracts the underlying data storage
– Can use LocalStorage, IndexedDB or other storage
• db.js makes IndexedDB easy to use
– But requires a polyfill in old browsers

24
Conclusion
• There is lots of goodness in HTML5
– But not everything is as useful
• Some of the API’s are hard to use
– But there are good libraries to make things easier
• Think about supporting older browsers
– Use polyfills where needed

25
Questions

?
The presentation and source code will be available
http://msmvps.com/blogs/theproblemsolver/

26

More Related Content

PPTX
Practical html5
PPT
PPTX
Building SPA’s (Single Page App) with Backbone.js
PDF
Modern UI Architecture_ Trends and Technologies in Web Development
PPTX
Modern Applications With Asp.net Core 5 and Vue JS 3
PPSX
Web technologies practical guide
PPTX
A Smooth Transition to HTML5
PPTX
WebNetConf 2012 - Single Page Apps
Practical html5
Building SPA’s (Single Page App) with Backbone.js
Modern UI Architecture_ Trends and Technologies in Web Development
Modern Applications With Asp.net Core 5 and Vue JS 3
Web technologies practical guide
A Smooth Transition to HTML5
WebNetConf 2012 - Single Page Apps

What's hot (20)

PDF
Owning Web Performance with PhantomJS 2 - Fluent 2016
PPTX
Edy Dawson Notes on SF HTML5 Dev Conf
PDF
Bootstrap Presentation Mitesh
PPT
Quick Start: Rails
PDF
Quick Application Development with Web Frameworks
PPTX
Web Tools report
PDF
Single page applications
PPTX
Single Page Application Development with backbone.js and Simple.Web
PPTX
A Smooth Transition to HTML5 Using MVVM
PPTX
Single page application and Framework
PDF
node.js in action
PPTX
Building WordPress sites with AngularJS and the RESTful plugin JSON API
PDF
The shift to the edge
PPTX
Making Single Page Applications (SPA) faster
PPTX
Wheel.js
PDF
Introduction To Single Page Application
PPTX
Web Based Development Introduction
PDF
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
PDF
The future of Activiti Cloud @ DevCon 2019
PPT
Top 10 web application development frameworks 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016
Edy Dawson Notes on SF HTML5 Dev Conf
Bootstrap Presentation Mitesh
Quick Start: Rails
Quick Application Development with Web Frameworks
Web Tools report
Single page applications
Single Page Application Development with backbone.js and Simple.Web
A Smooth Transition to HTML5 Using MVVM
Single page application and Framework
node.js in action
Building WordPress sites with AngularJS and the RESTful plugin JSON API
The shift to the edge
Making Single Page Applications (SPA) faster
Wheel.js
Introduction To Single Page Application
Web Based Development Introduction
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
The future of Activiti Cloud @ DevCon 2019
Top 10 web application development frameworks 2016
Ad

Similar to Practical HTML5 (20)

PDF
HTML5 features & JavaScript APIs
PPTX
Introduction to HTML5 & CSS3
PDF
Jsf2 html5-jazoon
PDF
Html5 workshop part 1
PPTX
Html5 Basics
PDF
HTML5 Technical Executive Summary
PPTX
PDF
Hello Html5 Css3 A User Friendly Reference Guide Rob Crowther
PPT
HTML5 Webinar - Mind Storm Software
ODP
Html5
PPTX
ODP
Html5
PDF
Html5 CSS3 jQuery Basic
PPT
HTML5: An Introduction To Next Generation Web Development
PPTX
HTML5: An Overview
PPT
HTML5 Presentation
PPT
Html5 Future of WEB
PPTX
PPTX
HTML5 for Rich User Experience
HTML5 features & JavaScript APIs
Introduction to HTML5 & CSS3
Jsf2 html5-jazoon
Html5 workshop part 1
Html5 Basics
HTML5 Technical Executive Summary
Hello Html5 Css3 A User Friendly Reference Guide Rob Crowther
HTML5 Webinar - Mind Storm Software
Html5
Html5
Html5 CSS3 jQuery Basic
HTML5: An Introduction To Next Generation Web Development
HTML5: An Overview
HTML5 Presentation
Html5 Future of WEB
HTML5 for Rich User Experience
Ad

More from Maurice De Beijer [MVP] (20)

PPTX
Full-stack App in half a Day: Next.js 15 Development Bootcamp
PPTX
Production-ready Next.js App with Cursor AI
PPTX
Building Robust Web Applications with Test-Driven Development and Playwright:...
PDF
Mastering React Server Components and Server Actions in React 19
PPTX
Practice TypeScript Techniques Building React Server Components App
PPTX
A foolproof Way to Estimate a Software Project
PPTX
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
PPTX
Build reliable Svelte applications using Cypress
PPTX
Building Reliable Applications Using React, .NET & Azure
PPTX
Concurrent Rendering Adventures in React 18
PPTX
Building reliable applications with React, C#, and Azure
PPTX
Building large and scalable mission critical applications with React
PPTX
Building Reliable Applications Using React, .NET & Azure
PPTX
Why I am hooked on the future of React
PPTX
Building reliable web applications using Cypress
PPTX
Getting started with React Suspense and concurrent rendering
PPTX
React suspense, not just for Alfred Hitchcock
PPTX
From zero to hero with the Reactive extensions for JavaScript
PPTX
Why I am hooked on the future of React
PPTX
The new React
Full-stack App in half a Day: Next.js 15 Development Bootcamp
Production-ready Next.js App with Cursor AI
Building Robust Web Applications with Test-Driven Development and Playwright:...
Mastering React Server Components and Server Actions in React 19
Practice TypeScript Techniques Building React Server Components App
A foolproof Way to Estimate a Software Project
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Build reliable Svelte applications using Cypress
Building Reliable Applications Using React, .NET & Azure
Concurrent Rendering Adventures in React 18
Building reliable applications with React, C#, and Azure
Building large and scalable mission critical applications with React
Building Reliable Applications Using React, .NET & Azure
Why I am hooked on the future of React
Building reliable web applications using Cypress
Getting started with React Suspense and concurrent rendering
React suspense, not just for Alfred Hitchcock
From zero to hero with the Reactive extensions for JavaScript
Why I am hooked on the future of React
The new React

Recently uploaded (20)

PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
PDF
Decision Optimization - From Theory to Practice
PDF
Human Computer Interaction Miterm Lesson
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PDF
SaaS reusability assessment using machine learning techniques
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
Decision Optimization - From Theory to Practice
Human Computer Interaction Miterm Lesson
Presentation - Principles of Instructional Design.pptx
A symptom-driven medical diagnosis support model based on machine learning te...
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Introduction to MCP and A2A Protocols: Enabling Agent Communication
giants, standing on the shoulders of - by Daniel Stenberg
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
Auditboard EB SOX Playbook 2023 edition.
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
SaaS reusability assessment using machine learning techniques
Build Real-Time ML Apps with Python, Feast & NoSQL
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Electrocardiogram sequences data analytics and classification using unsupervi...
LMS bot: enhanced learning management systems for improved student learning e...
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
NewMind AI Weekly Chronicles – August ’25 Week IV

Practical HTML5

  • 2. Who am I? • • • • • • • • Maurice de Beijer The Problem Solver Microsoft Integration MVP DevelopMentor instructor Twitter: @mauricedb Blog: http://msmvps.com/blogs/theproblemsolver/ Web: http://www.HTML5Support.nl E-mail: [email protected] 2
  • 3. What are we going to cover? • • • • • • Polyfills Semantic elements WebSockets Drag/Drop Graphics Storing data in the browser • Demos at: http://bit.ly/lph5 3
  • 4. Polyfills • Not every browser supports every HTML5 feature – Especially true with old browsers • Many missing features can be added using a polyfill – Offers the standard API – Often done in JavaScript – JavaScript is slow in older browsers  • A few good lists to check – Modernizr HTML5 Cross Browser Polyfills – HTML5 please 4
  • 5. HTML5 Semantic elements • New HTML5 elements – <nav> – <section> – <header> – <footer> – <article> – <aside> 5
  • 6. HTML5 Semantic elements • How about support? 6
  • 7. HTML5 Semantic elements • Why use them? – Searchability – Accessibility • Neither really makes sense – Search engines don’t really care – Use WAI-ARIA for accessibility support • Make sure to add support in older versions of IE – Modernizr – Html5Shiv 7
  • 8. HTML5 Semantic elements • The new HTML5 input elements – <input type="email"/> – <input type="number"/> – <input type="url"/> – <input type="date"/> – <input type="datetime"/> – <input type="month"/> – <input type="week"/> – ….. • Support is not very good, only really useful on mobile devices 8
  • 9. HTML5 Semantic elements • Other more useful HTML5 elements – <video> – <audio> – <meter> – <progress> – <time> 9
  • 10. WebSockets • A bi-directional socket connection – Between a web browser and the web server • The server can push updates to the browser – Refreshing the browser to see updates is so 2012  • Not just for games and chat applications – Any application where you want fast updates – Decrease the chance of concurrency issues 10
  • 12. WebSockets • Suffers from lack of infrastructure support – Routers and firewalls can cause issues • The API is low level – Messages are just simple objects – You might need to retransmit missed messages • Use ASP.NET SignalR – Uses WebSockets if possible – Otherwise it uses fallbacks like Comet – Supports scale out scenarios – Uses a very simple API • Using Node.js? – Use Socket.IO instead 12
  • 13. Drag and Drop • Drag and drop can be a very intuitive user interaction – Often seen as more fun by users • Very common interaction on tablets – But works equally well with a mouse • HTML5 supports drag and drop – Including dragging from the file system 13
  • 14. Drag and Drop How about support? 14
  • 15. Drag and Drop • Use jQuery UI instead of the HTML5 capabilities – Use jQuery UI Touch Punch for touch support – Add -ms-touch-action: none in CSS for Windows 8 15
  • 16. Graphics • Rich graphics are common in modern applications – Interactive graphics – Charts • Often generated on the client – Not just images downloaded from the server • Two basic options – Scalable Vector Graphics – Canvas 16
  • 17. Comparison of Canvas and SVG Canvas SVG Pixel-based (canvas is essentially an image element with a drawing API) Object Model-based (SVG elements are similar to HTML elements) Single HTML element similar to <img> in behavior Multiple graphical elements which become part of the Document Object Model (DOM) Visual presentation created and modified programmatically through script Visual presentation created with markup and modified by CSS or programmatically through script Event model/user interaction is coarse—at the canvas element only; interactions must be manually programmed from mouse coordinates API does not support accessibility; markupbased techniques must be used in addition to canvas Event model/user interaction is object-based at the level of primitive graphic elements— lines, rectangles, paths SVG markup and object model directly supports accessibility 17
  • 18. SVG • How about support? 18
  • 19. Canvas • How about support? 19
  • 20. Graphics • Use a library to make the API easier – Don’t worry about Canvas versus SVG • jqPlot is great for charts – It uses canvas – Includes exCanvas for IE 7/8 support • Raphaël is a great choice for general graphics – It uses SVG – Uses VML for IE 7/8 support 20
  • 21. Storing data in the browser 21
  • 22. IndexedDB • How about support? 22
  • 24. Storing data in the browser • LocalStorage is well supported – Except in very old versions of IE • IndexedDB is much more powerful – But the API is hard to use • Lawnchair is easy to use – Abstracts the underlying data storage – Can use LocalStorage, IndexedDB or other storage • db.js makes IndexedDB easy to use – But requires a polyfill in old browsers 24
  • 25. Conclusion • There is lots of goodness in HTML5 – But not everything is as useful • Some of the API’s are hard to use – But there are good libraries to make things easier • Think about supporting older browsers – Use polyfills where needed 25
  • 26. Questions ? The presentation and source code will be available http://msmvps.com/blogs/theproblemsolver/ 26

Editor's Notes