Dimitri Glazkov

My iPhone SDKfive days beforeSo, my good friend Steve spills the beans about the upcoming SDK.…HTML5 Wrapper for Gears

· 2 min read

Back into the Future of Web: HTML5 SQL Player2007Like a Three Stooges carpet-pull slapstick stunt, the HTML5 client-side storage spec…This is possibly the lowest-hanging fruit ever. After WebKit folks released their implementation of the HTML5 SQL storage specification, Gears immediately became the odd man out, the non-standards-compliant implementation. Never you mind that this part of the spec is still basically a twinkle in Hixie‘s eye. By adding the SQL bit into the latest WebKit nightlies (Windows users are still blissfully unaware of this, by the way), the legendary Apple team put a symbolic stake into the metaphoric ground: this better not be moving anywhere.

So I thought, why not connect the dots? Gears is a capable and much more mature implementation, both WebKit and Gears use the same SQLite server, so it should be just a matter of writing a simple wrapper to bring Gears back into the standards fold.

So here they are, WebKit’s Stickies running in Firefox with Gears, using a tiny bridge script I wrote (see the screenshot on Flickr if you aren’t inclined to install Gears). If you’re running Firefox 3, you may actually be able to write on those stickies. For Firefox 2 users, the lack of contenteditable support means that you can just create, move, and delete the notes. IE users are SOL‘d, because the Stickies sample uses DOM Level 2 events and other happy standards goodies. Do not let this stop you from using the bridge itself, though: it works in IE just peachy-fine.

The script, as I mentioned before, is laughably small and oh yes, incomplete. But I figured, the openDatabase and executeSql support take you about 80% of the way for most Web application development needs, and should the need for the other 20% arise, I would gladly oblige and be your code monkey.

Slides from my IPSA presentation on HTML5 and Google Gearsten days afterToday, at the monthly IPSA meeting, I gave a presentation on Google…Gearites and Safaritans, if you feel like I encroached on any of your wonderful work by creating this frankenstein, please let me know and we’ll sort this out.

Show 3 comments
  1. Psychic Origami » Blog Archive » Client-side sql databases in Javascript linked here · January 13, 2009

    […] available in Safari/Webkit. In the future it should appear in Firefox etc. Though there’s a HTML5 Wrapper for Google Gears that uses Gears to provide the html5 local storage functions (e.g. […]

  2. Rich · February 26, 2009

    Do you still have this script? Both examples are 404s at the moment…

    1. dglazkov · February 28, 2009

      Yes, you can find it here: http://code.google.com/p/glazkov-attic/source/browse/#svn/trunk/html5-sql-player