Good-bye Google Gears, hello HTML5

Google's decision to transition its applications to Web standards offers insight into the HTML5 standardization process

Google technologies are known for their extended beta test periods -- so much so that when the search giant actually ships a finished product it's front page news. But if beta represents the salad days for a Google project, its adult life can be considerably shorter and more brutal. Consider the fate of Google Gears. Launched just four years ago, Gears officially ground to a halt last week, soon to be replaced by equivalent technology from the HTML5 specification.

Gears arrived in early 2007 amid much enthusiasm among Web developers. Its goal was to provide a means for Web browsers to maintain state between sessions, bridging the gap between the traditional desktop computing paradigm and the nascent world of cloud computing. By maintaining copies of essential data on the client PC, Gears allowed Web-based applications to remain accessible even when the PC lacked Internet connectivity.

HTML5 Deep Dive
[ Get your websites up to speed with HTML5 today using the techniques in InfoWorld's HTML5 Deep Dive PDF how-to report. | Learn how to secure your Web browsers in InfoWorld's " Web Browser Security Deep Dive " PDF guide. ]

However, there will be no more new Gears releases. Gears will never be available for the latest wave of browsers, including the just-released Internet Explorer 9 and the upcoming Firefox 4. Even Google's own Chrome browser, which has shipped with Gears built-in since its inception, will be dropping support for the technology as of version 12, due later this year.

It's tempting to interpret Gears' demise as a failure for Google, but that wouldn't be quite right. Rather, the decision to discontinue Gears can be seen as a victory in Google's drive to promote open Web standards as an application platform, and it offers telling insight into the ongoing HTML standardization process.

Leading by example

In retrospect, Google has made no secret of its plan to retire Gears. It warned developers that Gears technology would eventually be deprecated as early as December 2010. But when you read between the lines of the media coverage of Gears throughout its life cycle, it quickly becomes clear that Gears had a terminal date almost since its inception.

In 2008, about a year after Gears was launched, I interviewed Dion Almaer, who at that time worked for Google Developer Programs. Even then, Almaer made no secret of the parallel development efforts underway at Google and the W3C's HTML5 working group. "You can take a look at the HTML5 proposal that's being actively edited at the moment, and you'll see that there's a database API like Gears has a database API," Almaer said. "We very much want this to be part of the Web for everybody to use."

In fact, Almaer made no distinction between the Google Gears technology and the specification being mulled at the W3C. "We've got Gears out there," Almaer said. "We've learned a lot from actually doing this work to get it working offline. So now we can go back to the standards groups, and we can share our experience, and we can work with them to get these standards that have actually been battle-tested."

To Almaer, not only was it a foregone conclusion that the Gears technology would be submitted to the W3C, but the fact that the Gears technology had already been tested in the field made all the difference, even though it was developed by a single vendor. "If you look at standards that have been successful versus ones that haven't, in my view, uniformly it's whether they've actually been tested or were just a bunch of vendors in a room trying to work out what to do," he said.

It seems clear now that the Gears technology was always intended as a blueprint for a future HTML specification. And Google hasn't been the only W3C contributor to take this "implement first, standardize later" approach. Mozilla and Opera have both implemented browser-specific CSS properties, for example, and both implementations have influenced the current formal CSS specifications.

As for Almaer, after leaving Google he would go on to lead the Mozilla Foundation's Developer Tools Lab and later headed up developer relations for Palm's HTML-centric WebOS platform. Increasingly, "lead by example" has been the watchword of the Web standards ecosystem.

Chasing the standards

If Google's voice has been especially loud in guiding the HTML5 specification, however, it should be commended for putting its money where its mouth is. Google is implementing the new standard not just in the Chrome browser, but in its Web applications as well. The search giant dropped support for Gears in Google Docs and Google Reader in May 2010, anticipating an HTML5-enabled version of each product to come.

Yet the "implement first, standardize later" approach that has guided Web standards of late hasn't always been successful. For example, Adobe was early to implement many features of ECMAScript 4, a revision of the standard that forms the basis of the JavaScript programming language and its derivatives, including the ActionScript scripting language used in Adobe's Flash platform. But the ECMAScript 4 effort foundered amid much debate and was eventually scrapped. Where once Adobe sought parity with JavaScript, today it is saddled with an ActionScript language that resembles its cousin in most respects, but that diverges in enough ways to make it incompatible with the modern JavaScript standard.

The planned replacement for Gears, the HTML5 Web Storage API, seems to be off to a similarly rocky start. Modern browsers that implement the standard do so in ways that are often subtly inconsistent. For example, Firefox 4 supports Web storage even for HTML documents loaded from the local drive, while Internet Explorer 9 invokes Web storage only for documents loaded from an HTTP URI. IE9 also handles storage events differently than other browsers. It may be some time before Web applications that take advantage of local storage behave consistently across all clients.

How well Google manages to transition its applications from Gears to HTML5 will be an important test of the most significant revision to Web standards since 2001. Recently YouTube -- a Google subsidiary -- experimented with transitioning its streaming video service from Flash to HTML5, but relented when it determined that the Web standards-based approach would not be compatible with a broad enough range of clients. The W3C's recent decision to remove version numbering from the HTML specifications and treat HTML as a "living standard" suggests that while the HTML5 spec is nearing completion, HTML's greatest challenge may be yet to come.

This article, "Good-bye Google Gears, hello HTML5," was originally published at InfoWorld.com. Track the latest developments in programming at InfoWorld.com, and for the latest business technology news, follow InfoWorld.com on Twitter.

Copyright © 2011 IDG Communications, Inc.