Taffy DB Javascript Database
Date : 2008 03 11 Category : Tech & DevelopmentWorking client-side with data can be challenging and projects have tried to address this in different fashions. Ian Smith, creator of Joe's Goals, has his own approach. He's created Taffy DB, a lightweight Javascript database
that allows you to insert, update, delete, order, loop, and query against a client-side collection of data. The great thing about it is that it's library agnostic and can work with all of the popular frameworks.
The idea came to me as I was working on Joe’s Goals 2.0 and I realized that one of the hardest parts about building any Web 2.0 application is working with data. There is no good way to use JavaScript by itself to gather, search, and maintain a collection of data. There are lots of great ways to great interfaces now days, but what about the data behind them? Taffy DB is the result of the research and testing I did for Joe’s Goals and is now avaliable for everyone to use.
Some of the key features include:
Under 10K! Simple, JavaScript Centric Syntax Fast Easy to include in any web application Compatible with major Ajax libraries: YUI, JQuery, Dojo, Prototype, EXT, etc CRUD Interface (Create, Read, Update, Delete) Sorting Looping Advanced QueriesThe syntax to use the libary is very straightforward:
Updating:
PLAIN TEXT JAVASCRIPT:friends.update( { state:"CA", married:"Yes" }, { name:"Joyce" } );
Inserting:
PLAIN TEXT JAVASCRIPT:friends.insert( {name:"Brian", gender:"M", married:"No", age:52, state:"FL", favorite_foods:["fruit","steak"] });
In addition, Taffy DB provides 12 different conditional statements (e.g.: "greaterthan", "equal", "like") to help build advanced queries that can further filter your results.
Ian has created a Getting Started Guide which will help in getting up to speed on the full capabilities of Taffy DB.