Server-Side Google Gears DB API

When Google Gears first came out, people were excited to see simple, powerful DB access in the browser. Now with Jaxer offering Ajax on the server, there's some very interesting client-server straddling to be done...

Dion Almaer already straddles Google, where he works, and Ajaxian, where he blogs. And as an early adopter (think first few hours) of Jaxer, he's already brewed cool examples of server-side Ajax. Since he's been talking to the Gears team internally to Google, he's now put together an example of using the same DB API on the browser and the server.

Yesterday we released version 0.9.2 of Jaxer, and in it you'll find that our Jaxer.DB.ResultSet now supports the Google Gears resultset API natively, in addition to its more JavaScript-y API. You can read more about these in the Jaxer DB documentation page. So Dion's example can probably be simplified a bunch now.

But what will be even more interesting is tying together client-side persistence with server-side persistence. Imagine e.g. that going off-line grabs your data from the shared database on the server, you get local persistence as needed, then going on-line syncs your data back to the shared database. The same code works on both, and could detect whether you're offline or online and just "do the right thing." No doubt this is just the beginning...