Christian Heilmann

Another foreword – HTML5 in Action

Tuesday, June 12th, 2012 at 11:07 pm

Keeping the streak alive, I was asked to provide a foreword for another book, this time HTML5 in action by Robert Crowther, Joe Lennon, and Ash Blue. So here is what I had to say:

Foreword

Explaining what HTML5 is can be a very daunting task. I’ve been doing this more or less since its inception and I am still amazed just how many myths and how much confusion is there on the topic.

With HTML5 we re-booted web development. The world of HTML4.01 and the non-starter XHTML left those who wanted to use the web as a platform for applications stranded. HTML4 was meant for linked documents and XHTML was far too strict for its own good and it lacked real support in browsers.

HTML5 started with a clean slate. We analysed what was used on the web and added a lot of features we didn’t have before, like CANVAS for creating visuals on the fly or accessing images and videos on a pixel level, native audio and video without the need for plugins and forms that validate in the browser without us having to write extra JavaScript. We also started mudding the waters by merging HTML and JavaScript functionality – a lot of HTML5 will not do anything without accessing the elements via a JavaScript API. This confuses a lot of people. We moved on from a document based web and in that process we need more technical know-how. And this means we need to rethink a few of our “best practices” now which can annoy people so that they spread nasty rumours about the viability of HTML5 as a choice for professional development.

HTML5 is built on the robustness principle, which means that a browser will make a lot of educated guesses what you might have meant when you make a syntax error instead of simply giving up and showing an error. This gives it backwards compatibility and we will be able to show pages developed for a never-to-arrive XHTML world in browsers these days. A large part of the standard is just that – it tells you how to write a browser that renders HTML5 rather than using it as a web developer. Again, this angers some people and they shout about the verbosity of the standard.

HTML5 is also the new hotness. A lot of advertising talk, shiny demos and promises of fidelity that matches native apps on phones make us cynical battle hardened web developers think back on Java, Flash and Silverlight and their promises and sigh. We have a lot of buzz about HTML5 and a lot of things that are not part of the standard are simply declared part of it as it makes a good punch line.

When it comes to extending the language and bringing new features into it we are running wild right now. Every browser maker and web company comes up with great new concepts on almost a weekly level. That can be frustrating for developers who just want to get a job done. Can you rely on the functionality that is currently developed or will the standard be changed later on? We are pushing browsers further into the operating system and allow them to access hardware directly which comes with security and robustness issues that need to be fixed by trial and error. Can you take that risk with us when it comes to delivering your product?

These are exciting times and when you want to be part of the ride you can help forge the future development environment for all of us. If you don’t have the time to follow the discussions on mailing lists, do a lot of browser testing in previews and propose own ideas you can be left quite confused.

And this is where a book like this comes in. Instead of promising you a cornucopia of functionality that will soon be available you get examples that work right now based on examples that worked in the past. Instead of getting experimental demos you learn how to build production code based on proven ideas but using the features in modern browsers that make it easier for us developers and much more enjoyable for our end users. All the examples come with a legend telling you which browsers support the features and you learn how not to give them to old browsers that will choke on them.

You will learn how to use HTML5 now, using secure and intelligent solutions like Modernizr and HTML5 Boilerplate and you will come out at the end understanding how to write things in HTML5 that work right now. This will make you a part of the movement to get HTML5 “production ready” for all of us.

Those who live on the bleeding edge of defining the next browser and language features need implementations in the wild right now. We are past the show and tell stage and we need to get to deliver and enhance. And you can become an integral part of this process by following the advice and applying the examples you find here. Go forth and deliver.

Share on Mastodon (needs instance)

Share on Twitter

My other work: