Sunday, October 5, 2008

Gears, Chrome and desktop applications

There's a common misconception that Google's "next-gen" web platform called Gears only (or even primarily) enables offline capabilities for web applications. The truth of the matter is that Google's ambitions are far greater, and the browser extension's capabilities are more multifarious, than this reputation suggests. MySpace's implementation of Gears, which has little to do with offline functionality, is a perfect example.

Gears has been available for over a year now, with the first version released not too far back in May 2007. You can see the whole version history here, but essentially Gears has undergone four releases, each adding incrementally to its capabilities. The last was released this past August, with another released a couple months earlier in June.

The overall goal of Gears is to bestow upon web applications much of the same functionality enjoyed by desktop apps. And it's doing so through a browser extension that can be installed for a range of browsers (Firefox, Safari, and Internet Explorer) on a range of operating systems (Windows, Windows Mobile, Mac OS, and Linux). With the release of Google's own Chrome browser, some users don't even have to install Gears; it just comes pre-loaded, making Chrome a super browser of sorts from the get-go.

The long-term consequence of this technology is clear: as browsers become more and more powerful with the assistance of initiatives like Gears, there become fewer and fewer reasons to install and run desktop applications (and therefore splurge on Windows and Office, to name two Microsoft cash cows oft identified as dying breeds).

But before that can happen, Gears and similar technologies need to truly enable desktop-like functionality within the browser (or more accurately, they need to enable desktop-like functionality for web applications that traditionally operate only within the browser).

So where do we stand today? Currently Gears can be used by developers to improve web applications in the following ways (on both desktop and mobile devices):

Client-side database storage: Most interactive websites depend heavily on databases that collect, organize and deliver the information contributed by users and in-house publishers. Traditionally, these databases have been deployed almost exclusively on the server-side, requiring users' computers to send requests and wait for responses whenever they wanted to do something non-trivial with a site's data. With the Gears Database API, websites can now establish databases on the client-side (i.e. your computer), allowing for quicker program speeds and certain offline capabilities (for when you can't get online to query remote databases). Client-side webpage serving- Gears can essentially turn your computer into a server of webpages and other flat data files for when regular web servers can't be reached. The LocalServer API lets websites cache their pages when you are online and serve them up later when you're not. It can also be used to speed up certain actions through caching for when you are still online. Desktop shortcuts- For web apps to act like desktop apps, they need to open like them, too. So Gears makes it easier for developers to place shortcut icons on the desktop that users can use to open web apps with the standard double click. While basic site shortcuts for the desktop were possible before, the Gears functionality makes the user experience of adding and using these icons more intuitive. The graphic quality is higher, multiple sizes are supported, and in the future shortcut icons will support communicative overlay icons (for apps, such as webmail, that want to tell you how many unread messages you have, for example). Multiple file uploads- Normally, when you want to upload a collection of files to a website, you have to select them one by one (unless the website you're using has decided to implement a Flash or Java-based loader). With Gears, it's possible for users to select multiple files at a time and batch upload them, saving you time and tediousness. Geolocation- For mobile devices that can determine the user's current location, Gears makes this geolocation information available to applications running within the browser. The geolocation API can be used to identify the user's position once or to watch it over time as the user moves around. Permission to access a user's position must be granted through a special dialog, preventing unwanted snooping. Background processes- A lot of times when using JavaScript-heavy web apps, you have to wait while certain processes finish chugging along. With the so-called "WorkerPool" API, time-intensive processes can run in the background where they won't slow down your general experience. The result: web apps feel more snappy because they don't get bogged down as often.

The Gears team at Google rolls out capabilities based on the perceived demand for them. The following features have been alluded and may show up in upcoming releases:

Progress bars: Whether you're uploading one large file or several small ones, you probably want to know how things are going. Traditionally there's no way to tell where you stand as you look impatiently at the spin of your cursor's hour glass. But with Gears, you'll be able to see a real progress bar telling you how much of the data has reached the server already. File resumption- When large file uploads fail these days due to connection interruptions, you have to start from square one and reupload everything again. Gears promises the ability to resume uploads so you can start where you left off. On-screen notifications- Users of Growl and microblogging desktop clients like Twhirl are accustomed to on-screen notifications that appear in the corner of their screens when anything new happens. Future versions of Gears will allow any website to trigger such notifications, whether or not they are currently running in the browser (perhaps allowing us to kill off the email notifications that many web apps abuse to spur return visits).

In the long run, we might see support for complex 3D graphics that take full advantage of your computer's graphics card. Upload functionality could get integrated into the menus that pop up when you right click on files. And web apps could get loaded at startup or triggered in any number of other ways throughout your computer's operating system (and its native desktop applications).

Source: Mark Hendrickson TechCrunch.com