Saturday, June 30, 2007

Google Gears and client side caching

This is getting more and more interesting. Today I read an article that explained Google Gears very lucidly.

I think, this is going to make UI coding and the design patterns still more interesting. Large parts of relatively static data can be cached on client side, data that the browser cannot cache easily, like DHTML tables. I am wondering if I can use it in my Flex 2 application.

I guess the only downside is that the user will be asked to install Google Gears on their desktop. I don't see much of a problem, since I used it for Google Reader. However, if this was used with some more critical application, I will probably think twice before I do that.

Here is an interesting code snippet, originally here:


function initializedb() {
if (!window.google || !google.gears)
return;

try {
db = google.gears.factory.create('beta.database', '1.0');
} catch (ex) {
alert('Could not create database: ' + ex.message);
}

if (db) {
db.open('gearsintro');
db.execute('create table if not exists articles' +
' ( article_id int, title varchar(255), content text )');
}
showArticles();
}

Labels: , , , , , ,

Tuesday, June 19, 2007

RDBMS has come to the browser

Ajaxian reports:

Firefox 3 is to support SQLite for offline storage. The new alpha release tells us this and a lot more (below).

The world of the RDBMS has come to the browser, and has jumped from server to client in the Web platform.

I think this is a pretty interesting innovation. Suddenly we will have a lot more agile storage space on the client side. We can do some complex relational storage on the client side. I wonder if cookies will undergo a major transformation (like limit on cookie size etc.). I wonder if we will see nice Javascript APIs to access the RDBMS on the client side (or did I miss it; is it already there?). I wonder if Browsers will collocate some of these data, and we may see something like 'single instance storage' on the client side? I think all of this was possible even without the RDBMS, however a database on the client side makes us think the various possibilities that existed on the server side.

Labels: , , , , , , ,