I've been working on an OODB (object-database) for Coldfusion! It uses CouchDB as the data-storage engine and it is Railo compatible. As far as I know, there is no OODB for Coldfusion yet, so this is fairly cutting-edge.
So far I've got the basic CRUD working, and it is WAY cool. Instead of data-mapping by hand or even using CF 9's fancy new ORM (object-relational mapping), you just make your object and go like so:
OODB.save(myObject, 'myObjID');
How simple is that?! When you want to populate an object with saved data, you go like so:
OODB.load(myObject, 'myObjID');
This has the potential to save vast amounts of development time by allowing developers to focus almost entirely on object behavior instead of data-mapping. I think OODB will be really useful for projects that have relatively small data storage needs (blogs, wikis, etc). SQL will probably remain the best choice for large datasets though.
The next big thing I need to do for this project is to make an OODB method to get lists of object IDs based on the data within them. Until then, this code is more cool than it is useful.
If you'd like to check it out, download CouchDB for Coldfusion. You'll find the OODB files in the OODB directory. Don't forget to install CouchDB first! You'll also need to modify document.cfc to get it working.
WARNING: I don't recommend this for real-world use yet: this is beta code running on beta software.
Follow me on Twitter if you'd like to stay up to date on the latest developments.
Special thanks to Mingo Hagen and Sean Corfield for their continued input and support.
Monday, August 31, 2009
An object-database for Coldfusion
Posted by Russ at 5:26 PM
Labels: coldfusion, couchdb, oodb
Subscribe to:
Post Comments (Atom)
1 comments:
Very cool stuff. I've been messing around with CouchDB a ton lately so I'll definitely take a look.
Post a Comment