Monday, July 4, 2011

Noodles!

One of my friends, Ross Robinson, is working on an interesting little side project. A nifty http request based external database. He calls it NoodleDB.


What's really interesting about it is that it allows for completely client-side applications, while still providing a place to store all your data. The main purpose of the project is to provide a service for very quick prototyping, letting you push and retrieve arbitrary JSON objects just by http request. I'm alittle bit in love with this idea, seeing as I hate setting up databases and all those finicky things.

I spent alot of time working out how to do asynchronous database connections between app engine and javascript while working on Omnomnom, and I think I'm going to wrap that up into a library that'll plug right into NoodleDB.

Ross is mainly focusing on the server-side API end of it. In inspiration of my work with Xo-Skeleton I'm going to be building a javascript library called xo-noodle.js. I'm thinking for having three commands:


xo-noodle.setup("database url");
xo-noodle.save("json object", [optional:extension url], [optional:html img id]);
xo-noodle.query("query", "callback function", [optional:extension url], [optional:html img id]);

///Example
xo-noodle.setup("yousite.com/db");
xo-noodle.save("data","/user");
xo-noodle.query("query", "displayItem()", "/item");


Setup sets up xo-noodle to point to a certain location.
Save pushes a json object to the location provided by setup, as well as pointing it to any sub url provided. IF you also include a html img tag id, it will populate it with a loading gif and a success gif on finish as well.
Query sends a query to the location provided, pushing the result to the provided function. The optional parameters work the same as Saving.

I'll be fleshing out the first version shortly and iterate from there.

No comments:

Post a Comment