Skip to main content

Change of Heart

Posted by editor on June 4, 2007 at 5:35 AM PDT

Google Gears and its Java-based alternatives

So, one of the big announcements last week was Google Gears, which allows web applications to operate in an offline mode. It does this by installing a local database server (SQLite) and a browser extension that offers a JavaScript API to interact with the database.

Because of its use of a browser extension, it is limited to a specific set of browsers and operating systems: currently Firefox and IE on Windows, Mac OS X, and Linux. Presumably, the SQLite install would also require admin privileges. (fact check me on this, someone, please? Also check if Gears' Linux support is Intel-only? Thanks.)

Surely, I can't be the only one thinking... maybe y'all could have done this in Java? Using an applet-embedded database like Derby / JavaDB would offer zero install hassles and not present any concerns about native-OS compatibility. Java would also be compatible with more browsers and OS'es on Day One than the native browser plug-in will probably ever be. And as noted in last week's feature article, applets can be used to maintain state for webapps, even surviving refreshes and page-closes. Setting aside the sometimes iffy nature of JavaScript-applet communication, this seems like a more compatible, lower-maintenance approach.

So how did this option get missed? As your editor often asks, "was Java considered and found lacking, or never considered at all?" This seems like a huge missed opportunity for our favorite platform, especially considering that Sun and Google have a partnership.

Google says "the company's long-term hope is that Google Gears can help the industry as a whole move toward a single standard for offline capabilities that all developers can use." My gut tells me that this arrangement has a "string, tape, and popsicle sticks" design smell that isn't going to hold up, but if that's true, maybe something else will succeed. After all, you can put an all-Java persistence solution to work today, and get to more browsers and operating systems.