Taffy DB : A JavaScript database for your browser

[from http://blog.joesgoals.com/]

I’d like to take a moment to introduce something I’ve been working on a while: TaffyDB.

TaffyDB is a free (opensource) JavaScript database for Ajax applications. It works by creating a thin (under 10K) data layer within your application. You can insert, update, delete, order, loop, and query against the data layer and integrate it with just about any JavaScript framework such as YUI and JQuery.

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? TaffyDB is the result of the research and testing I did for Joe’s Goals and is now avaliable for everyone to use.

TaffyDB is not a visual library. You’ll still need to code the user interface. TaffyDB reduces acres of custom JavaScript data handling code to single line commands, giving you more time to work on interface.

Examples:

  • Create a contact collection:

var contacts = new TAFFY([]);

  • Add a contact:

contacts.insert({id:1,first_name:”John”,last_name:”Smith”,age:29});

  • Find contacts with a last name of Smith than are older than 22:

contact.find({last_name:”Smith”,age:{greaterthan:22}});

  • Order contacts by last name and then first name:

contacts.orderBy([”last_name”,”first_name”]);

You can also update, delete, loop, and much more. To learn how check out the Getting Started article. I’d also be delighted to hear any feedback or bug reports you have. Please submit them here.

posted @ 2008-03-12 22:05 wingoo 阅读(145) 评论(2)  编辑 收藏 所属分类: 1.0.Open Source

  回复  引用  查看    
#1楼 [楼主]2008-03-12 22:06 | wingoo      
或许能带来些新的想法:)
  回复  引用  查看    
#2楼 2008-03-13 16:27 | Jeason      
JS的内存是最大的瓶颈

标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
"五向定位"职业成长路线公开课(上海、南京、大连)
Google站内搜索


相关链接: