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 by Nathan

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://www.alagad.com/reactor), 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).

Nathan is a software developer at The Boeing Company in Charleston, SC. He is essentially a big programming nerd. Really, you could say that makes him a nerd among nerds. Aside from making software for the web, he plays with tech toys and likes to think about programming's big picture while speaking at conferences and generally impressing people with massive nerdiness and straight-faced sarcastic humor. Nathan got his programming start writing batch files in DOS. It should go without saying, but these thought and opinions have nothing to do with Boeing in any way.
This blog is also available as an RSS 2.0 feed. Click your heels together and click here to contact Nathan.