HTML 5 Starts Looking Real

Dr. Dobb's Digest September 2009

HTML 5 Starts Looking Real

CIO's dilemma: HTML 5's openness or the power of Flash or Silverlight?

By Rob Cherny

Rob Cherny is lead developer for user experience consultants NavigationArts.


The World Wide Web Consortium's statement last month that it was retiring the XHTML 2 Web markup language in favor of HTML 5 sent ripples across Web development waters. The declaration solidified HTML 5 as the official future of Web development based on open standards. In the process, HTML 5, with its plethora of new features, was certified as the first legitimate challenger to the proprietary solutions of Adobe Flash, Microsoft Silverlight, and Sun JavaFX. What, you don't find a new version of a Web markup language that exciting? It's true, some of the new elements and tags defined in the core HTML 5 working draft are probably in the boring-but-important category -- such as new semantics in tags including nav, header, section, aside, and footer, among others. But there's a lot to intrigue anyone doing or in charge of Web development:

These each solve some specific problems, but, more important, they bring HTML, JavaScript, and Cascading Style Sheets (CSS) development on par with many key Flash and Silverlight features. Why does this matter? Openness. Before many of these HTML 5 features, there was no real open alternative to Adobe and Microsoft's closed solutions. HTML 5 changes this by supporting open standards that expose underlying technologies, enabling integration, innovation, and development of more complex software and services.

Why Openness Matters

The Web has succeeded because of its open architecture -- text-based, accessible, fully open, platform independent. This architecture is based on publicly defined HTML, CSS, JavaScript, XML, RESTful APIs, specifications, and network protocols. Anyone with the means can create software to browse or serve the Web by implementing these standards on any platform, allowing the unfettered exchange of ideas, information, and commerce. To many developers, this open architecture is the whole point of the Web. If proprietary technologies and browser plug-ins were required for every site, the Web couldn't run as it does today, nor would the Web be as successful as it has been. A closed, proprietary, plug-in-based Web would break user platform expectations and mix up usability conventions such as context menus, keyboard shortcuts, and form controls. It would prevent bookmarking of URLs and use of the back button. It would constrain users with accessibility concerns, from text resizing to high-contrast viewing.

Admittedly, proprietary solutions can offer great innovation, but they also add barriers to use and frequently limit their development to usage of specific development tools. This is because only select experts know how the technology works, and only proprietary tools can generate the required files, making vendor lock-in a reality.

5 New Tools: HTML 5 Adds These Key Features

Canvas -- JavaScript to create Web graphics

Location API -- Interface to location data from GPS or other sources

Video Element -- Easier to embed video on Web pages

AppCache -- Allows Web sites to launch offline

Web Workers -- Background threads that speed execution

Conventional wisdom once held that different browser vendors' proprietary features and interpretations had made consistency in Web development nearly impossible to implement. This has changed. Since the early 2000s, most Web browsers have supported the W3C's open standards in a much more uniform way, making development more straightforward. You only need to look at how users rapidly adopted Mozilla Firefox, Apple Safari, Google Chrome, and Opera to see how standards compliance leads to developer and user converts. Collectively, these browsers already have implemented large parts of the HTML 5 feature set that are, in most cases, enabled without proprietary plug-ins. This is the Open Web at work.

Back To HTML 5

Companies know all these things, but they can build incredibly powerful rich Internet applications today with Flash and Silverlight. So how does HTML 5 have a chance? Why do some see HTML 5 spelling doom for proprietary solutions? It all comes back to the openness issue. To build front-end applications in HTML, JavaScript, and CSS, all you need is a browser and text editor. Additionally, it's easy to pick apart existing examples online using the browser's View Source features.

HTML 5 already is being built into browsers and used today, even though it isn't fully defined. The W3C hopes to have a "last call" on HTML 5 by October, when it will be fairly feature-complete. Some browsers, particularly Internet Explorer, don't support many HTML 5 features. To pick up the pace, Google created a plug-in called Gears to bring advanced features to browsers that don't support the newer features. Yes, there's plenty of irony in a plug-in solution to a non-plug-in problem.

It's a fairly telling decision on Microsoft's part that it's implementing its upcoming online versions of Office using JavaScript, HTML, and CSS, not Silverlight. Finally, one just has to look to the mobile Web to see HTML 5 taking off, where entire applications are being built for iPhone, Palm Pre, and Android handsets. These often use HTML 5 features such as offline storage to deal with less-persistent connections and demonstrate the incredible potential.

This all leaves companies doing Web development with a choice: Embrace open standards, or stick with proprietary platforms.

CIOs, developers, and ultimately end users face three possible directions:

Like most emerging technology decisions, there aren't easy answers. Flash and Silverlight do things natively that must be built from scratch with HTML 5 technologies. For instance, rich, dynamic animations and transformations that Flash and Silverlight can perform must be created by hand using HTML 5's Canvas element. However, both Silverlight and Flash get those results by running in a sandboxed environment that, while powerful, has yet to lead to truly mass-market adoption in terms of Web sites that make use of Flash or Silverlight, and it limits a site's ability to exist in an open manner. Closed platforms, with their unique toolsets, also may present steep learning curves for developers. Contrast that with the ease of adoption offered by the ubiquitous and simple View Source and HTML in the browser.

Where To Start

So what should you do? You can begin to use HTML 5 today by switching out the HTML 4 and XHTML 1 Doctypes in your code to the HTML 5 Doctype. From there, it's an evolutionary process, as the rich features of HTML 5 become more widely adopted. Should you select a plug-in-based solution, it should be a measured and carefully thought-out process, not an arbitrary decision. Factors that favor open standards approach include:

Major considerations for a proprietary, plug-in-based approach include:

The Web started with developers turning to View Source in the browser to learn about HTML. That trend continues. Thanks in part to its being an open environment, HTML and its related browser-based technologies have always lowered the barrier to entry for developers and users. HTML 5 shows the technology maturing, providing an outlook that's never been better. Still, if you have the staff with the right skills, a controlled environment, or the need for a high-end media experience, Flash and Silverlight are strong options -- for now, anyway.