I had to make some changes to a ColdFusion project the other day, and as I was digging through the code, it struck me that it would be interesting to see a direct comparison of code. I’ll try to be objective, but I admit a bias right up front - I prefer writing Ruby code lately, both for the clean and uncluttered code and because my text editor came with a bunch of powerful code snippet tools (which are a good thing for lazy typists like myself).
Filed under: Uncategorized |
Tags: Uncategorized





I’ve been enjoying your articles on RoR but I think you’re really distorting things here. As you point out at the end of your post you keep making framework comparisons and not language comparisons.
There is really little value in saying that CF is not as effective as RoR because they are completely different things. One is a language and the other is a language plus framework.
If Rails as a framework is so marvellous what is stopping say .NET on Rails, Java On Rails or CF on Rails from emerging. Is there something specific to Ruby that enables Rails? If it is possible to build CF on Rails would you go back to CF? These would be more interesting answers.
Geoff:
Distorting things how? I make it clear in this article that it’s not fair to compare raw CF code to a fully developed Ruby framework right from the start, and then further on in the article.
You ask “if Rails as a framework is so marvellous [sic] what is stopping [other languages] on Rails from emerging?”
This is where I get a soap boxy - none of those languages are as simple and yet powerful as Ruby. There will no doubt be Rails equivalents for every popular language shortly (there are already comprehensive versions for PHP and I believe Python) but they’re not nailing it like RoR does. It’s fair to say that you couldn’t do Ruby on Rails without Ruby. Ruby is very malleable, and very apt for allowing domain specific languages to be written around it. Ruby on Rails is essentially and entire itself that rides on top of Ruby and needs that extreme flexibility that Ruby provides.
You’d be able to duplicate a lot of the power that Rails provides in ColdFusion, but is it worth it? Would you be able to replicate the strong OS development spirit that Ruby on Rails currently has? Would patches be submitted constantly, keeping the framework solid? From what I’ve seen with ColdFusion frameworks and the communities that follow them, it would be nearly impossible to match that kind of open source enthusiasm. It’s not that I don’t want to see that kind of thing happen in the ColdFusion community, but I just don’t see it happening. Do you?
I think the example you have chosen is fairly simple. I could achieve this functionality in several different ways. What i would need to know is how is rails handling joins on tables. Do we need to specify the joins manually? Again how do the views for these joins get generated on the model? In CF for instance, we could directly execute stored procedures in a fairly simplistic way without being bothered about the generated view of this procedure? How is this achieved in ROR? And going a little beyond, is there any support for Distributed transactions? How well does the “application” scale?
When making this comparisons between coldfusion and ruby on rails. Where can i find info on how ruby interacts with flash. I”m hiring a friend who knows flash and coldfusion, but we are now ruby and html, with flash yet to integrate. how well does ruby and flash work together.
thanks
I don’t think it is truly possible to compare two languages with such different audiences. ColdFusion is designed to support enterprise application development. Until RoR has been bombed more it will be hard to compare the two. I am not particularly happy with the state of ColdFusion frameworks and would be glad to see a better one, but as far as code readability I’d call Ruby, Python, JSTL, and ColdFusion as tops with everything else far behind. But then maybe I am just used to seeing tags or well intented code. Good article, I’d like to read more about RoR.
Hi Geoff,
“If Rails as a framework is so marvellous what is stopping say .NET on Rails, Java On Rails or CF on Rails from emerging. Is there something specific to Ruby that enables Rails?”
Yes.
“If it is possible to build CF on Rails would you go back to CF?”
It’s not possible.
“These would be more interesting answers.”
Take some time to learn about Ruby, and you’ll find the answers you seek.
I’m a ColdFusion guy learning Ruby/Rails at the moment, and I cannot wait until I am able to let loose the CF teat for good.
Irvin Owens Jr - ColdFusion is designed to support enterprise application development.
Please support this with an example - what is an enterprise application and how is CF suited to building one exactly? I think you’ll find the the underlying JRUN would be better for enterprise than CF
About Rails in other languages, it for most languages is not possible. Ruby has some very flexible features, such as adding and creating methods (methods as in belongs to a specific class) at runtime (which Rails uses greatly). That one feature alone is a reason most other languages can’t create Rails. For more information, http://media.rubyonrails.org/video/rubyonrails.mov, this video is about the making of Rails and its creator tells about how it wasn’t possible in the first language he tried (PHP) and what made it possible in Ruby.
I think maybe Python could do it (not 100% sure though..). The only language other then Ruby that Rails could be made in is Lisp, but why make it in Lisp when we could use it right now in Ruby?
Rails VS Coldfusion, Where it is not an apples to apples comparison. Lets remember how coldfusion didn’t get the ability to make a user defined function until MX7. Even java script came with this ability =).
I maintain coldfusion apps every day, I replace CF apps with Rails apps at night.