Google Gears

Web applications can now work offline with this open source plug-in. Google has launched it May 31 in 2007, licensed free and open source, first under the nameGoogle Gears, then it has been renamed Gears.
It runs on Internet Explorer, Firefox, Chrome, Safari, Opera and the major operating systems today.

HTML 5 is now the technologies for Ajax online and is supported by Google, but the firm will continue to maintain Gears.
It is highly recommended to look at HTML 5 to start a new long term developement. For immediate and portable usage, Gear remains useful.

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.

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).

It was used by Gmail to read mails without being connected to Internet. By Google Reader is already available.

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.

The Gears runtime must be started online. Even if we wants to use the browser as a platform and that we design an application to work locally, it should be put on an website at first before we can use it offline.
The system is therefore primarily useful for a service provided by a website, that would be downloaded as software, and could operate on the desktop without connection until the next update.

How it 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.

Gears and others

Gears appears in a context of progress where same innovations are made by several products at the same time. Thus we can think to following tools:
- Mozilla Chromeless. To start web applications from the desktop (but in connected mode).
- Adobe Air. This environment for rich Internet applications has an offline mode.
HTML 5 provides offline operations but its implementation will depend on browsers.

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.