The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

The ColdFusion Reactor - If you don't know about it, pay attention!

posted under category: ColdFusion on April 21, 2006 at 1:00 am by MrNate

There's been some buzz around the community, but it's still on the down-low. It's an open source project that's getting people excited. It's Reactor, by Doug Hughes. Reactor is an ORM framework (Object Relational Mapper), meaning it transcodes your relational database into objects for you to use in your CF programming. Or, to state it another way, IT WRITES YOUR SQL CODE FOR YOU. (How can I be more clear?)

What? Oh that sounds like auto-generated code - Run for the hills! No, Reactor is different. It's better. The objects it writes let you do what you want with them, and its XSLT code generation gives you even greater control. Furthermore, it takes advantage of best practices for data access layers. While the internals may seem complicated, the API is simple and robust. Most developers will be able to pick it up in a few minutes.

Using it is simple. Describe the data relations you want to use in the Reactor xml config file using the very obvious hasOne and hasMany tags, instantiate the ReactorFactory object and ask it to create your gateway, objects, and so on. Save() this, delete() that, all in a day's work for Reactor.

One thing I'm starting to see is people using Reactor as the entire model layer of their MVC applications. In a large-scale app, it probably can't be your entire model layer, but it can do most of the work.

Doug is an absolutely fantastic coder, and he's doing a seriously great job on this. Really, truly, very, good. Thank you Doug!

Intrigued? Your next step should be to download Reactor, or check out the source (svn://, go through the samples and docs, then read Brian Rinaldi's great getting started guide. After that, join the mailing list, get involved, talk about it with your homies.

As a last note, watch out for API changes - It's alpha software, mostly stable, but constantly changing. If you lock yourself into the API (things like createRecord), there's a good chance it will change (the naming conventions for records, specifically, are changing).

Too old to comment!
On Apr 21, 2006 at 1:00 AM João Fernandes (joaofernandes of said:
Hi there,

If you download the latest version from SVN be careful because docs aren't updated and a lot has changed.

Reaction...heumm .. Reactor is great indeed ;)

On Apr 21, 2006 at 1:00 AM Scott Stroz (scott whose email lies with said:
Reactor = more gooder.
Too old to comment!