Wednesday, March 19, 2008

TaffyDB - A JavaScript DB worth trying out

I recently read about TaffyDB, tried it today. Seems like a handy tool. I would like to use it. TaffyDB is a JavaScript Database, something that can be used for offline data processing in my opinion. For example, a relevant use case is I would like to cache a large report on my browser side and present different views by querying the TaffyDB (I would not like to make server side calls).

It seems like previous attemps have been made for a JavaScript database, a few example are - JavaScript SQL Database with Permanent Storage, Simple JavaScript Database, etc.

TaffyDB is pretty simple to use. Seem feature rich - Under 10K, CRUD Interface (Create, Read, Update, Delete), Sorting, Advanced Queries etc.

Code is pretty easy to write too. Pretty cool, check it out.

Labels: , , , , ,

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: , , , , , ,