Activate your free membership today | Log-in

Tuesday, March 11th, 2008

Taffy DB Javascript Database

Category: Ajax, Database

Working 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 Queries

The syntax to use the libary is very straightforward:

Updating:

JAVASCRIPT:
  1.  
  2. friends.update(
  3.         {
  4.         state:"CA",
  5.         married:"Yes"
  6.         },
  7.         {
  8.         name:"Joyce"
  9.         }
  10.         );

Inserting:

JAVASCRIPT:
  1.  
  2. friends.insert(
  3.         {name:"Brian",
  4.         gender:"M",
  5.         married:"No",
  6.         age:52,
  7.         state:"FL",
  8.         favorite_foods:["fruit","steak"]
  9.         });

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.

Posted by Rey Bango at 12:37 pm
7 Comments

++++-
4 rating from 45 votes

Wednesday, March 5th, 2008

CouchDB: Using E4X to get the XML back

Category: Database

Christopher Lenz has been spending time on the CouchDB project. He got lulled over when CouchDB went to JSON.

He talks about how "CouchDB is pretty well positioned for storing and querying XML data in addition to JSON" via the E4X support that it gets out of the box as it uses SpiderMonkey.

JAVASCRIPT:
  1.  
  2. by_lang: function(doc) {
  3.   var html = new XML(doc.content);
  4.   map(html.@lang, {title: html.head.title.text(), …});
  5. }
  6.  

To be fair, this is already possible if you use other view servers (such as the Ruby or Python ones), where you also have access to the XML support provided by the respective standard libraries. Given CouchDB’s incremental view update model, you usually don’t care so much about the performance of view functions as you care about the data it produces. So if your view function can somehow parse the XML and put some data into the view index, that's usually all you need. Actually querying the view is going to be really fast.

But E4X is an exceptionally convenient API for XML. I think using E4X is going to be a pretty good approach for those who want to to CouchDB to store and query XML content.

Posted by Dion Almaer at 6:18 am
1 Comment

+++--
3.8 rating from 10 votes

Thursday, January 3rd, 2008

Apache CouchDB: Congrats to IBM and Damian Katz

Category: Database

CouchDB has been getting people re-energized about DB stuff recently. Some got gung-ho about the OODBMS and that fizzled and people went back to the "ug, I guess we just do the SQL thing and be done with it... and maybe use an ORM if we really hate it".

Then the Couch came along and had us all thinking about JSON being the next "turtles all the way down".

Well, IBM was excited enough to hire Damien Katz to work full time on it:

All the code will be Apache licensed and donated to the Apache Software Foundation, with the plan CouchDB will eventually become an official Apache project. A big plus here is the Apache license allows anyone to do pretty much anything with the code, so everything remains truly open source. I wouldn't have done this without IBM's commitment to keeping CouchDB open.

It is going to be to see what us JavaScript folk do with a DB that is RESTful and JSONified.

Congratulations to IBM for a great score (and to Damien too).

NOTE: Kris Zyp joining SitePen

Also, congrats to Kris Zyp and SitePen for tying the knot. Both Kris and SitePen are top notch outfits, and a great fit.

Posted by Dion Almaer at 7:27 am
5 Comments

++++-
4.5 rating from 24 votes

Monday, October 22nd, 2007

WebKit Does HTML5 Client-side Database Storage

Category: Browsers, Database

The WebKit team has implemented an implementation of the HTML 5 client side storage API which gives you an asynchronous API:

JAVASCRIPT:
  1.  
  2. var database = openDatabase("Database Name", "Database Version");
  3.  
  4. database.executeSql("SELECT * FROM test", function(result1) {
  5.    // do something with the results
  6.    database.executeSql("DROP TABLE test", function(result2) {
  7.      // do some more stuff
  8.      alert("My second database query finished executing!");
  9.    });
  10. });
  11.  

Once you have the latest nightly, you can check out their database example and even see the tool that is available in the Web inspector:

Posted by Dion Almaer at 8:03 am
15 Comments

++++-
4.8 rating from 22 votes

Friday, August 24th, 2007

Adobe AIR: Can we have synchronous queries, please?

Category: Database, Adobe

Justin Palmer has an interesting post about the dealing with the asynchronous nature of Adobe AIR’s SQLConnection class and the challenges it poses when dealing with the DBMS' response. Justin shows some creative ways of working around this through the use of Responder objects and event listeners:

var connection = new air.SQLConnection();
connection.open(air.File.applicationResourceDirectory.resolve('development.sqlite'));

var statement = new air.SQLStatement();
statement.sqlConnection = connection;
statement.text = "SELECT * FROM contacts";
statement.execute();

The code above, albeit a little long winded, is the bare necessities for executing a query. While it looks fairly straightforward on the surface, we’ve already run into our first problem. If the execute operation is asynchronous, how do we know when we can begin to retrieve and manipulate the data returned? We can do it one of two ways, register an event listener or pass a Responder object to the execute method.

From the looks of this thread it appears this is on the minds of several other folks and Adobe's working on developing a method for synchronous SQL calls is in the works.

Posted by Rey Bango at 6:00 am
9 Comments

++++-
4.4 rating from 12 votes

Wednesday, February 7th, 2007

OpenToro 4.0: Ajax Web Database Publisher

Category: Java, Database, Framework

OpenToro 4.0, an open source Ajax Web Database Publishing tool, has been released.

OpenToro is a CMS written in Java that allows the development of database driven web Applications in a quick and agile way.

If you need to build simple CRUD applications that are faces onto your database, this could be a tool for you.

Download the set of demo screencasts to learn more.

Open Toro

Posted by Dion Almaer at 5:29 am
5 Comments

++++-
4.4 rating from 37 votes

Friday, July 7th, 2006

PHP-Based MySQL-to-JSON Converter

Category: Remoting, Database

A new PHP component by Adnan Siddiqi accepts a MySQL result set and converts it into a JSON message. MySQL To JSON:

This class can be used to convert data from MySQL query results into a JavaScript expression in JavaScript Object Notation.

It takes a MySQL query result handle and retrieves the query result column names and the query result data.

The class generates the definition of a JavaScript object in JSON that contains an array of a rows of query result data.

Each array element represents an object with the properties set to the query result column names. The property values are the query results for the respective row and column.

Posted by Michael Mahemoff at 7:23 am
11 Comments

+++--
3.1 rating from 54 votes

Thursday, March 2nd, 2006

Under the Radar: Session 2 - Make It Easy 2.0

Category: Editorial, Office, Database

After four "When" companies got a chance to impress us with their Web 2.0 goodness, four "Make It Easy" concerns are now up to the plate: Dabble DB, Rallypoint, The Form Assembly, and Zoho.

Each company has eight minutes to present their wares. A panel (Michael Arrington, Rael Dornfest, and Krishna Akella in this session) and the audience give feedback for eight minutes.

Dabble DB

The co-founders are up talking to us about their Dabble DB service. It's a hosted database for the rest of us. Business users know that spreadsheets aren't the best way to store data, but they feel that databases are "scary."

They showed a demo of taking a spreadsheet of information from an O'Reilly OSCON from a few years ago. The UI of Dabble DB lets you either import data to create a spreadsheet, or manually enter the data. They cut-and-pasted and CSV export from Excel, and they're demoing a really neat ajaxian interface for the data -- spreadsheet on the web.

They're also showing ad-hoc queries against the spreadsheet interface, using a simple filter type interface both across all text or specific fields, and you can save the results of queries for later viewing.

They also have a calendar view of database data, where they parse out date-like values and plot them on a calendar -- and you can apply the same searches against the calendar view, too. It's a really fast, compelling interface -- better than some of the When calendaring apps we saw in the last session.

They are also demoing schema changes. For example, they make it super easy to take a text field and change that to a lookup table relationship -- something that traditional databases make painful, and they also make it easy to migrate other fields to the new lookup table.

They also export data to RSS, PDF, CSV, iCal, HTML, OPML, and text.

The audience was very complementary, and both Michael and Rael on the panel seemed impressed. A great product.

Rallypoint

The Rallypoint dude is talking about how hard it is to do effective collaboration in a team environment: you start passing documents around, you lose track of ersions, and before you know it, things are a big soupy mess.

Goal for Rallypoint: combine the features of a word processor with the collaboration features of a Wiki, tied together with an ajaxian user interface.

The demo of adding a new page shows off their word processor interface. It's pretty much the kind of rich text editing we've come to expect from ajax apps without any dramatic differences.

The security features allow you to protect a page, allowing only certain users and groups to view/edit/subscribe to the page.

The versioning features weren't shown, and there's no way to export data at present, though they all working on an export feature.

The general consensus from the panel was: "This is a crowded space, good luck."

The Form Assembly

The creator of The Form Assembly is up, talking about web forms, saying that many websites need web forms for various reasons (registrations, etc.) and up until now there hasn't been an easy way to get them (riiiiiight).

The product lets you build forms and show reports based on the form data. The UI was pretty nice. I didn't see anything revolutionary.

The product is free up until you get more than five responses to your form. After that you either pay as you go (12 cents per response) or you buy a $25/month subscription.

Michael Arrington: "Can I massage the data that users enter?"
Answer: There's a junk filter for removing spam.

The panel thought the pricing was just way off but otherwise seemed to appreciate the product, though not enthusiastically.

Zoho

Wow, Zoho is a suite of business applications on the web: Writer, Virtual Office, CRM, and, err, more. They're showing us Zoho Creator, which is for "creating web applications with no lines of code."

(By the way, thanks to a crash, we're able to see it was written using Java Struts. Neat.)

You can create applications either by basing it off a template, or creating a new one from scratch. So far, the application is composed of creating a web form.

The form creation is less visually impressive than the other form builders we just saw. In fact, once you actually start using the form you've created, the quality of the UI is quite primitive compared to the other Web 2.0 apps we've seen. There are some ajax features, but they look tacked on in a really cheesy fashion.

So, they're done showing features, so it looks like "applications" are just web forms and tables showing the data entered in the web form. Neat. The table viewer of the entered data isn't as impressive as Dabble DB but does have a few ajax features, like the ability to dynamically change the set of columns displayed, etc.

They showed us their on-ine spreadsheet for just a few seconds, and it looked really cool. I was tempted to think they were showing us an embedded Excel instance as the demo was in IE Windows, but I think it was a pure Ajax implementation. Geez, they also have an Outlook clone, too. So, some of the products look pretty cool but they didn't go very deep.

Their vision is to be a complete, fully functional MS Office clone on-line. They let you import Excel and Word and other formats into their products.

Michael Arrington: "You guys have a reputation of copying others and being overly aggressive in PR. You need to change that."
Answer: Some sort of muffled argument refuting the accusation.

Conclusion

There are a lot of really cool emerging database/form applications that make web-based form applications really easy to create. Dabble DB rivaled desktop database front-ends in terms of making it really easy to deal with data. Very cool!

Posted by Ben Galbraith at 1:57 pm
10 Comments

+++--
3.8 rating from 40 votes

Wednesday, January 25th, 2006

AjaxMyTop: MySQL Monitor

Category: Showcase, Database

We've seen in-browser SQL, a database administrator, and even a database designer. Now there's a database monitor...

AjaxMyTop shows active MySQL connections. You get a data grid showing connections, each showing ID, user, duration, and so on. Periodic Refresh ensures the connections are kept fresh, and you can easily set the refresh period in an input field. Being a true data grid, the connection list can be sorted and filtered on one or more fields. In a nice touch, the column heading morphs to include a text input when you want to type in a filter for that column. It's nice to see keyboard shortcuts here, certainly a feature every DBA will welcome.

Right now it looks to be read-only ... hopefully the team will add a "destroy connection" button real soon now!

Posted by Michael Mahemoff at 11:06 am
18 Comments

++++-
4 rating from 44 votes