Pete Freitag Pete Freitag

CF on Rails

Updated on December 06, 2023
By Pete Freitag

I have noticed two CFML developers have made the switch to Ruby On Rails (a Rapid Web Application Development Framework for the Ruby programming language).

Michael Buffington was the first CF developer I noticed make the switch:

I took a perfectly good (arguably) ColdFusion application and rebuilt it from the ground up in Ruby on Rails. My goal was to match features exactly, but I couldn't help but toss in some subtle Ajax improvements as well as clean up all the URLs for the app (more after the jump).
I'm super pleased with the outcome, and the entire process of the rebuild.
Building a Rails app for me was very satisfying. I had just started becoming comfortable with Ruby, and once I actually planned out the rebuild, it really became fun. The leaps and bounds you can make quickly with Rails is truly amazing. I'm used to rapid application building with ColdFusion, but Rails is more rapid, which was a surprise.

I should point out that Michael is no CF newbie, he has been working with it for years, and has even given some talks at conferences on ColdFusion.

Greg at SocialTwister has moved to rails, and writes:

For my fellow CFers out there, I'll simply say that I still love CF, but Rails Rocks. My CF code was written very similar to the way Rails works now so it made a lot of sense.

So can we build a framework as cool as ruby on rails for coldfusion?

I tend to think so, CFML has been the king of RAD web development for the past 10 years. CFML is a language that was designed for rapid development. Ruby on Rails is a framework for the Ruby programming language. I would think having a good framework for RAD development in CFML would be able to beat RAD development in Ruby any day. But perhaps I'm just biased?

You can't really blame Michael, or Greg for switching - they just want to turn their ideas into apps quickly. CF is great for that, but they have found Ruby on Rails to be faster and easier for their needs. I'm sure if they had a framework for CFML that did what rails can do, they would be looking at it.

ruby rails rubyonrails coldfusion frameworks

CF on Rails was first published on July 24, 2005.

If you like reading about ruby, rails, rubyonrails, coldfusion, or frameworks then you might also like:

FuseGuard Web App Firewall for ColdFusion

The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.

The weekly newsletter for the CFML Community


So, what does rails do for ruby? What sort of things do the framework do for you that makes it so easy for rapid development? This sounds like something that COAL is designed for, but im not sure until I know exactly what rails does...
by Ryan Guill on 07/24/2005 at 8:28:02 PM UTC
I know that Joe Rinehart has been working something "rails like" for use with the model-glue framework called Rocket. There aren't many details out there, but I believe that's the intent.
by Rob Brooks-Bilson on 07/24/2005 at 9:30:44 PM UTC
as far as the i18n world goes, it's more like ruby-off-the-rails, it's pretty primitive (i've seen the word 'lame' used to describe it). i suppose that will change eventually but it took cf years and php even longer to get anything really useful going.
by PaulH on 07/24/2005 at 11:28:13 PM UTC
I've been thinking about writing a "hey CF community, we're falling behind! we need a CF on Rails!" type app post for awhile, but I haven't done quite enough research to be able to really say that. For one thing, I haven't yet used Ruby, but I've read that one of the reasons that RoR works so well its because of it's "plain english" like syntax, much like Haskell.

One other reason I haven't posted about it is because I need to check out the Churvis' PLUM, which looks good on paper, though I wouldn't say it's necessarily something which directly correlates to RoR.

Being a Python hack, I've also been looking at Django which was very recently released and looks promising as well.

So many frameworks/languages/cool stuff, so little time... :)
by Brandon Harper on 07/25/2005 at 3:01:54 AM UTC
It's incredible - everybody must be reading the same blogs at the same time. I also saw those posts and was contimplating what it would take to get a rails framework for ColdFusion.

ColdFusion HAS some very nice frameworks that enhance productivity. However, the one thing that seems to come out in any rails conversation is the abstraction of database calls. I've only looked at RonR briefly but it seems that they've got a very slick way of automating getter and setter functions with the DB. It requires a rigid naming convention on the db side in order for the script to find it but it seems that taking care of that plumbing is a big hit for many people.

Another feature that draws ooos and awes is the built in AJAX features. They've implemented some standard AJAX library stuff that developers call from code and it just works. I'd like to see some of this with CF but Flash Forms are 'supposed' to be our RIA platform of choice. ;)

Anyway - what other things does Rails do that we currently aren't getting from our frameworks?
by Matthew Reinbold on 07/25/2005 at 9:46:48 AM UTC
Another CF framework to take a look at as far as "faster RAD" goes is PLUM, by Adam and David Churvis.
by Rob Brooks-Bilson on 07/25/2005 at 10:19:00 AM UTC
Is PLUM a true MVC framework or and code generating ide? I saw their presentation at CFUnited and only ended up confused. And is it really a faster RAD if it only develops a highly specialized (albiet common) sort of site?
by Matthew Reinbold on 07/25/2005 at 11:24:40 AM UTC
It already exists

If PLUM isn't RAD, nothing is.

Mark Fuqua
by Mark Fuqua on 07/25/2005 at 5:03:54 PM UTC
I consider myself a very pragmatic and agnostic programmer. And although I admit that I tend to prefer open source software for both technical and strategic reasons, I understand that for team X, project Y and client Z, tecnology T might be the best choice both technically and economically, regardless of anything else.

But from a technical standpoint, there's really no comparision between (Ruby|Python) and CF. Having a bit of commercial CF experience myself, I would claim that 70% of the stuff you can only do using components and nasty UDFs in CF, are natively available in (Ruby|Python) *or* can be written in 3 lines of very concise and *readable* code. Plus, of course, there's the obvious advantage of free, open-source software, with a community as strong or as helpful as that of CF.

Also worth checking out Django (, from the Python guys. Too bad it took the Python community so long to come up with something as good as Rails. I still like Python a lot but right now I've got way too many lines of working Ruby code to switch back :)
by Jonas Galvez on 07/25/2005 at 8:09:18 PM UTC
Since I was implicated, I think that it's worth chiming in.

I actually was talking to Michael when out in Portland a week ago. We were both pondering about a CF version of Rails as well.

One part of the appeal is the discovery of the database that occurs. I think that this can be done with relative ease although it's not as direct. I've seen some projects that will let you get access to SQL Server and Oracle, but they rely on polling several sys tables. Rails does indeed make use of some relatively strict rules although they can indeed be overwritten.

Another thing that comes "for free" are cleaner, nicer looking URLs.

A third thing I was really interested in is the ActiveMailer which handles all sorts of mail items. Previously, I used iMS Mail Server with CF and while I had control to do all I wanted, it was an expensive route with licensing CF, iMS, and SQL Server.

And that's one of the major points.. licensing. Indeed there's so little to consider. My $7.95 a month account does wonders. We were already running Linux for our mail server and this made it quicker.

I'll compare this to the sometimes painful process I was going through developing DAOs, Gateways, Beans, Controllers and the like. I know I wasn't using a published framework, but even if I was using Fusebox or anything else it would still take a lot longer.

And for background, I've been doing CF for 8 years now. I've taught classes on the matter and made the majority of my income in that time as a CF consultant - so I've been on the CF bus for quite some time and have no problems with CF at all.

So in summary.. Rails is really cool. I would love to see CF on Rails and I think it's very viable. I think a MSSQL tie in would be quite interesting since Rails -> MSSQL seems to only work well when on a Windows box (some driver related thing).

I think the CF community could use something like this to generate a nice bunch of interest from new people.
by Gregory Narain on 07/27/2005 at 11:05:20 PM UTC
I actually got started on this a couple months ago but got detoured by other projects at work. I call it "ColdFusion on Wheels" :) And I got an ISAPI re-write engine for IIS to get the REST architecture running.

One of the great benefits of Rails is that you can build a functioning app using helper scripts that write the OO code you need to wrap around the database, as well as the CRUD pages for getting info into the tables. So with 2 or 3 script calls you've got a fully functioning (albeit very bare-bones) web app. You can't get more rapid than that! Duplicating this functionality was the next step in my project.

The problem now becomes writing millions of functions that do everything for you! I've run into a few deadends ... you can't really use custom tags the <cfimport> way because you aren't allowed to use variable names in the taglib= attribute, so I'm using CFCs for just about everything.

I'll have to start that project up again now that I see there might actually be some interest ...
by Rob Cameron on 08/10/2005 at 2:36:59 PM UTC
Very cool Rob, yeah keep workin on it... I like the name CF on Wheels too...

I have some code written that uses the JDBC API get database meta data. Though its not totally done. I could contribute that to the project.
by Pete Freitag on 08/10/2005 at 2:46:45 PM UTC
This may be very irrelevant, but 'ColdFusion on Wheels' doesn't exactly roll off the tongue. Don't underestimate the power in a good name. 'Ruby on Rails' works because of the alliteration and low syllable count. It's easy to say. If alliteration for a ColdFusion based package seems too forced - 'Cold Cable', or 'Cold Course' there is always 'Fusion Groove', 'Fusion Tracks', 'Fusion Rails', etc that might be a better fit, easier to 'market', etc.
by Matthew Reinbold on 08/10/2005 at 6:01:43 PM UTC
I am glad that I am not the only one who is impressed with Ruby on Rails and wants to see a CF version.

It seems that in the CF world everyone is arguing my framework is better than your framework while the earth is moving beneath their feet.

If the Python, PHP and dotNet communities are building versions of rails, why not CF'ers? I don't mean tacked onto another framework but a ground up port.

Count me in as one willing to help. It has to be a community effort to succeed.
by Rick Mason on 08/12/2005 at 1:57:26 PM UTC
I guess it would be nice to see a CF on Rails but I am not sure. Some of the things you can do in Rails are made possible by Ruby itself and would require some terrible hacking about to make work with CF (for example the ability to create Mixins which are very useful in a Rails app such as mine where I need to create UUID's to insert into the DB).
by robi on 10/19/2005 at 4:51:36 PM UTC
I grant you it would be difficult if not impossible to emulate Ruby itself in ColdFusion.

I do know of one effort however to replicate active record and that will be a great step forward.

If we want to attract new people to CF we need to not lose the rapid application development lead.
by Rick Mason on 10/19/2005 at 7:53:48 PM UTC
It's official!
by Rob Cameron on 11/14/2005 at 4:56:15 PM UTC
Just a quick question about CF on Wheels... So it does URL rewritting..does that mean it only happens in development mode or would my hosting account have to support that?
by Tony on 07/08/2006 at 7:32:01 PM UTC