Angus Kidman19 June 2008, 1:00 PM
Google is working on solving a number of 'pain points' in browsers, including giving web apps the ability to send you an alert even when your browser is closed.
One year on from its its launch, Google is enhancing Gears with features that would seem ideal for enhancing Google properties such as Gmail and YouTube, but the search giant still won't commit to adding them.
At the Google Developer Day event in Sydney, Gears engineer Chris Prince demonstrated a series of prototype APIs designed to expand Gears from its current focus of making applications available offline.
Those prototypes include features such as notifications for web apps which can appear even when the browser itself is closed, a potentially useful addition for Gmail, and the ability to monitor and resume uploads for large files, a feature YouTube is crying out for. However, Prince was non-committal when asked if and when Google itself would grab those opportunities.
"All I can see about that is that all the applications are out of our control," Prince said. However, he did offer a glimmer of hope: "Those teams are looking at using Gears for their products. We'd love to see them add them."
Switching Gears
Part of the reason for Prince's reluctance may be the company's conscious effort to promote Gears as an industry-backed platform that can help solve a variety of problems. "I think people have a common misconception that Gears is just about offline applications," Prince said. "The first year of Gears' life was about offline applications, but going forward it's going to be about much more."
"At its core Gears is a browser extension. We provide a new set of JavaScript APIs that are available to the browser. We don't want Gears to be this isolated self-contained environment that only one company can benefit from."
As part of that approach, Google has switched from branding the project as Google Gears to simply Gears. "It's a little bit of a symbolic move," Prince said.
"We want it to be possible to create web apps that are equally as powerful as desktop apps, and the way we want to do this is by unlocking the capabilities of the local machine. We want to solve real-world pain points. We don't want to create a hotchpotch of APIs that may or may not be useful."
Playing with APIs
Prince demonstrated a number of prototypes that are in the current Gears source tree, including the ability to provide notifications that are more sophisticated than a basic browser pop-up. "If your Web application has something important to tell the user, what's that experience like? It's awful!," he noted. "There's no formatting, it's just a simple string, the title is out of my control, and it's jarring. From a usability perspective it's just really a terrible experience."
The under-development notification API allows for custom notifications, including an icon, title and descriptive text, with the ability for multiple notifications to stack neatly. "We want to prevent these things from fighting with each other," Prince said. The API also supports interaction with existing notification engines such as Growl and the ability to time notifications to start and end at specified points.
Another API allows attaching of multiple files in a single selection, rather than having to add each file separately. "There's a pain point that must of us have experienced on a regular basis," Prince said.
That feature makes use of a new data type, the blob, which Gears uses to handle binary data. "The blob is going to be a very exciting object," Prince predicted.
Blobs can be sliced into smaller pieces, a feature which allows downloads to continue after an interruption and to provide accurate progress indications. Gears achieves that by slicing files into 1MB chunks which are uploaded in sequence. Quite frankly, this can't get added to YouTube — which dumped its previous timed option in favour of a generic upload graphic earlier this year — soon enough.
Gears is also looking at new geolocation APIs to allow applications to track location, using a mixture of GPS, WiFi and mobile phone data. "We do want this to be open; we don't want this to be tied to Google in any way, " Prince said. "We don't want people to be locked into any type of service."