Google Gears API to power offline Web applications


Author: Shirl Kennedy

Released just this morning at Google Developer Day in Australia, Google Gears is “an open source browser extension” that allows developers to leverage JavaScript for offline Web application functionality.

Plugins, which work with Linux, Mac OS X, and Windows, are available for Firefox and Internet Explorer. Support for Safari and Opera are forthcoming. On the Google Gears API Blog, engineers Aaron Boodman and Erik Arvidsson caution that this beta “is still a bit rough and in need of polish, but we are releasing it early because we think the best way to make Gears really useful is to evolve it into an open standard.

“We are releasing Gears as an open source project and we are working with Adobe, Mozilla and Opera and other industry partners to make sure that Gears is the right solution for everyone.”

In Google’s press release, Kevin Lynch, senior vice president and chief software architect at Adobe, indicated that the Gears API will be available in Apollo, Adobe’s “cross-OS runtime” that lets Web applications run on the desktop.

The API comprises three modules:

  • LocalServer, which “allows a web application to cache and serve its HTTP resources locally, without a network connection.”
  • Database, which “provides browser-local relational data storage to your JavaScript web application,” using the open source SQLite.
  • WorkerPool, which “allows web applications to run JavaScript code in the background, without blocking the main page’s script execution.”

Google Reader users can get up close and personal with Google Gears as of today, with a new “offline” feature that “enables you to read your 2000 most recent items even when your computer is not connected to the Internet” — a godsend for frequent flyers or office drones stranded in antediluvian meeting rooms that lack connectivity. To get started — which requires the installation of Google Gears — just click the “Offline” link marked with the red “New” icon at the top of the Google Reader home page, next to your Gmail address.

Other sample applications are available for your perusal, and/or you can download the code. There’s a developer’s guide to get you started, and a tutorial — Enabling static files to work offline using Gears — which “shows you how to create a manifest file, and make your files available offline.”

Shirl Kennedy is the senior editor of theDocuTickerandResourceShelfWeblogs as well as the “Internet Waves” columnist forInformation Today. She has been writing about technology since 1992.