Google Gears to change the way people expect web applications to work!
June 10th, 2007
As web applications have increasingly become go-anywhere repositories for the minutiae of our day-to-day lives (email, contacts, photos, appointments, to-do lists), there has been a behind-the-scenes race to make them keep working when you unplug your laptop from the Internet. Others have promised great things, but it seems Google come from behind to win the race with the launch of Google Gears.
Google has announced the beta release of Google Gears, a web browser extension that allows web applications to continue to work even when a user is disconnected from the Internet.
Gears works in Internet Explorer and Firefox on Windows, Mac OS X, and Linux, with a view to eventually supporting Safari as well.
Far from the plug-and-go solution that you might expect, Gears is actually just a layer of relatively low-level features that make offline web apps possible. A lot of the hard work is still up to you.
Gears gives you three features, which you access and control in your web application using JavaScript code:
- Local Server
Register a collection of URLs that Gears will download and keep a local copy of for the user. The user’s browser will then transparently receive these local copies, which remain accessible when offline, instead of fetching the online versions. The local copies may be set to update automatically, or only when you want them to. - Database
Store data in a relational database just like you would in your server-side code, except that your users each get their own database. You can also access this database more quickly from your JavaScript code, because the database is stored on the user’s computer. It also remains accessible to your Local Server-cached JavaScript code when the user goes offline. - Worker Pool
The least glamorous part of Gears, unless you’re a total JavaScript geek like me. Essentially makes JavaScript multi threaded, enabling you to run time-consuming operations (like parsing a large XML document, or downloading a bunch of data into a Google Gears database) in the background, without freezing the browser or causing script execution time warning dialog boxes to appear.
With these tools, you can build applications that not only keep working using local copies of HTML, CSS, JavaScript, and image files, but work faster because they can store user-specific data locally instead of having to retrieve it from the server all the time.
No doubt Google’s full range of online services will soon be enhanced with Gears-powered offline support. To begin with, however, Google has started with just one of these services: Google Reader. With Gears installed, you can now switch Reader into offline mode, at which point it will download up to 2,000 articles from your subscribed feeds for you to read offline. This manual switch works well enough, but it does rely on the user to remember to click it before going offline.
Gears doesn’t make these things easy, but it does make them possible, and for now that may be innovation enough. No doubt the easy-to-use application frameworks built on these foundations are already on their way.
Read more at: Google Developer Day 2007, sitepoint.com












Leave a Reply