Wednesday, October 1st, 2008
Category: Database
, JavaScript
Uriel Katz wrote in to tell us that he's burned his GearsORM framework to the ground to create the entirely new JStORM framework, announced in his blog. JStORM currently supports Google Gears, Aptana Jaxer, and Adobe AIR, but it's still bleeding edge: no documentation yet, just code. But the feature-set is interesting:
* define your tables as models.
* full CRUD support.
* events on(Before/After)Delete/Save/Update.
* SQL LIMIT/OFFSET support.
* order by support.
* automatic creation of tables.
* selecting and deleting over relations.
* easy iterating with each syntax like in Ruby,support for query chaining and more.
* basic introspection support.
* transaction support.
* self relations.
* support multiple backends and multiple dialects,currently MySQL (in Jaxer only) and Sqlite (Jaxer, Gears and AIR).
Here's an example of loading "Person" entities from a database using JStORM:
JAVASCRIPT:
-
var Person = new JStORM.Model({
-
name:"Person",
-
fields: {
-
firstName:new JStORM.Field({type:"String",maxLength:25}),
-
lastName:new JStORM.Field({type:"String",maxLength:25}),
-
},
-
connection:"default"
-
});
-
-
Person.all().each(function(person) {
-
console.log(person.firstName);
-
});
Looking forward to seeing some docs, Uriel ;-)
Tuesday, March 11th, 2008
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:
-
-
friends.update(
-
{
-
state:"CA",
-
married:"Yes"
-
},
-
{
-
name:"Joyce"
-
}
-
);
Inserting:
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.
Thursday, January 3rd, 2008
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.
Friday, August 24th, 2007
Category: Adobe
, Database
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.
Wednesday, February 7th, 2007
Category: Database
, Framework
, Java
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.

Thursday, March 2nd, 2006
Category: Database
, Editorial
, Office
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!
Wednesday, January 25th, 2006
Category: Database
, Showcase
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!
