Arf, ObjectBreeze, Reactor and More!
Created by Model-Glue author Joe Rinehart, Arf has gotten quite a bit of attention lately. It aims to implement a Rails-like active record factory. Arf is still early in its development, but I was able to pull a copy from the Subversion repository and get it running (error free) relatively easy. There isn't alot of written documentation yet (Arf! trac site), short a partial quickstart guide, but Joe has put up quite a few video walk-throughs on his site that make Arf! relatively painless to get started. However, lacking written documentation, you will likely find yourself doing alot of cfdumps to work through some of the complexities.
It is important to note, that (as far as I can tell) Arf! does not create any actual code, but injects methods on the fly (forgive me if I am oversimplifying things). You do create the components, but outside of a couple of lines of code that might establish relationships (like hasMany() or belongsTo()), the components themselves are relatively empty. Arf! does necessitate using some conventions when building your database tables (although it appears that the defaults can be overridden), but your Arf! active record will automatically give you access to the getter and setter methods, DAO and gateway for your database table. Also, the record can access methods to get information for related records, and even validation (based upon your table). Validation error messages can be customized using the Arf! dictionary, which also gives you a nice means of storing and accessing all sorts of information about your record.
In my tests of Arf!, I have found it to be easy to use and have not run into any errors (granted what I have built is not overly complex yet). My only complaint would be that it seems to add quite a bit to page processing time, even in production mode. It isn't unacceptable (especially given all that Arf! can do), but it may not be suitable for high traffic sites.
ObjectBreeze
Based upon my cursory intial review of ObjectBreeze (created by Nic Tunney), it has alot of similarities to Arf. It will automatically create your getter/setter methods (using getProperty("propertyName") versus the getPropertyName() used by Arf!) and DAO, however it does not create gateway methods as Arf does. Instead of gateway methods, ObjectBreeze includes methods for creating and populating collections from a query that you pass to it (nicely, you can commit entire collections using a single method call - collectionCommit). You are not required to create any cfc's for objectBreeze. It can handle the same types of relationships Arf can, but those are not configured in the component, but in the code (for example, you would do objectName.containsOne("tablename") after instantiating your object using objectBreeze). It does not appear as if objectBreeze requires any table conventions other than the need for a primary key column (which you should have anyway). It does not currently have built in validation, but that is on the wish list.
ObjectBreeze does have some basic documentation, and seems pretty straightforward (though I had already used Arf! and that may have made this easier to jump into because of the similarities). I did not get as far in my tests with ObjectBreeze as with Arf!, but it did appear to run quite fast. It is definitely worth following this project as it progresses.
Reactor
Reactor is created by Doug Hughes of Alagad fame. I did quite a bit of testing with Reactor around the 0.1 relaease (and some updates thereafter). I have not tested the latest 0.5 version yet. Reactor was easy to get set up (like the others, it is mainly copying the files and creating a mapping). Reactor gives you access to your getter/setter methods, DAO and and Gateway, and allows you to create relationships like those discussed above. One interesting difference was that Reactor actually created a cfc files for you (two for each object), one of which is intended to allow you to customize. I did run into some issues with the early alpha release (which is obviously completely expected and forgiveable), but it appears that these have been fixed in the latest release. Reactor also has built in validation and customizable error messages similar to Arf!. One thing I liked about Reactor was that it uses xsl stylesheets to generate the code for you, and this made Reactor very easy to customize to suit your needs (and I did quite a bit of that on the early version). In development mode, Reactor wasn't fast, but production mode was quite fast since it used the already generated code (actually Reactor had three modes).
The only real documentation for Reactor currently appears to be Doug's posts on the topic, although some appears to be currently in the works. I hope to review Reactor further when I have the chance to get into the 0.5 release code, and this "review" should be considered very preliminary.
Others
There are other very attractive options as well, I just have not had the chance to review them all (maybe down the road). You have probably heard of the Rob Cameron's Rails-like ColdFusion on Wheels already as it has received alot of attention. Steve Bryant's DataMgr looks quite interesting as well. And if you just don't want to have to do the tedious code portions, but also don't want (or cannot) to be tied to one of these tools, you can use Peter Farrell's Roobios Code Generator, which is an online tool that will generate bean and Lightweight Transfer Object code for you to copy/paste.
Thanks!
Hopefully this is a useful review of some very solid tools available for ColdFusion by some developer's willing to devote a lot of time and hard work to the community, and I would like to take this opportunity to thank all of them.
Doug has changed a bit his framework and now you have a config file in xml.
Watching this file you should be able to understand how this new version works.
(It also builds business objects for you on the fly as well)
http://www.compoundtheory.com/transfer/
Great comparison. Just what the doctor ordered.
Sami

