Google Gears

Web applications can now work offline with this open source plug-in for Internet Explorer, Firefox, Opera and Safari.

Why Gears?

It is the main interest for the Scriptol site, Web applications must also work offline, because connection is not always possible or desirable, or that applications are too slow, and one the other hand, because it is preferable for the programmer to not have to choose between the local environment or the Web.
Google Gears brings a stone for building such universal applications.

The battle of plug-ins

Google describes it as follows: "Gears is an incremental improvement to the web as it is today. It adds just enough to AJAX to make current web applications work offline".
It is the result of a collaboration with Mozilla, Adobe and Opera, to create a functionality which was also developed by Mozilla for Firefox 3. It will be more general and will function with all interfaces, therefore with Flash and will compete directly with Silverlight.
Thus we can see that the announcement by Microsoft of Silverlight based on XAML, a very ambitious project which could extend to the Web the supremacy of Windows, lets competitors to react. Adobe which had already decided to release open source its concurrent technology Flex, joint with Google by sharing the code of its Apollo environment.
Thus Google could even compete with Microsoft on its domain, in the field of desktop software.

Features of Google Gears

The plug-in incorporates SQLite, a database manager for local storage, thus data are available to applications in the same manner that with SQL, without connection to the network.
It will allow Web applications already written to become desktop applications.
And on the other side, local applications could be extended with capabilities of the Web, such as search engines which will collect online data to use them offline.

How that works in practice

Before entering in offline mode, the browser, once the extension is installed, asks you for your authorization.
Then the resources used by the application are stored in a cache memory, where they could be found without connection, while data are recorded into a SQLite file.
To enter in offline mode, one clicks on a button, and that starts the saving of data and resources.
It is still required to to connect oneself from time to time, to recover data coming from the Web.

More technique

Gears is composed of three JavaScript modules:
- LocalServer. It puts in cached memory the resources (HTML, JavaScript, images, etc.) and restores them with needed.
- DataBase. Locally record data in a SQLite base.
- WorkerPool. Makes applications faster by delivering the resources in an asynchronous way (thus it is an extension of Ajax).

Applications

One will be able for example to read the messages of Gmail (the messaging service of Google) without being connected to Internet. Google Reader is already available, and other applications are promised by Google, but any developer can propose its application and even extend the plug-in if needed.
Some examples are provided on the site of the project, but the applications are unlimited, in fact any Web applications that can store data enough locally to work offline will benefit ot it.

Finally, to be known:

Gears is provided under the BSD license. Google Web Toolkit will be extended with Gears. The Dojo framework was deprecated but now it integrates Gears. Silverlight is not, but Gears is more portable. AIR (formerly Apollo) will incorporate Gears for Flash applications.

More information

(c) 2007 Denis Sureau. Scriptol.com. All rights reserved. June 2, 2007.