ColdFusion is a tag-based, back-end web language that has been around since the mid-1990′s. I first used ColdFusion on a client site several years ago. For me, it was the simplest language I every learned because of its similarity with another language I used at the time, iHTML. They seemed to share the exact same tag set, aside from the prefix. <itag> here was <cftag> there. I used ColdFusion again for a client a few years later, now version 6 (MX). Not much had changed, which allowed me to get the job done quickly. A developer normally adopts using a language for such reasons. Yet, I didn’t. Even as a developer with a ColdFusion shop for 3 years, I never personally adopted the language.
Why? The answer is simple, in my experience of the language, across several versions, it has not evolved. Maybe the language’s change of hands, Allaire – Macromedia – Adobe, put it behind the times. Understandable. Yet, I feel that even the languages core features left wanting.
Dated Practices
As I said before ColdFusion is a tag-based language. This makes the language simple and straightforward. But you immediately lose the efficiency of developing complex code with a simple script. <cfscript> the evangelists scream. <cfscript> made ground in ColdFusion 8 (I will come back to this). Yet there is something fundamentally limiting about <cfscript>. It doesn’t support ColdFusion tags, you can only use ColdFusion functions within a <cfscript> block. Wait, that means within a <cfscript> block you lose most of this tag-based language’s features. Opps!
Not to harp on the limited scripting of ColdFusion, but their lack of basic operators. As I referenced above, it wasn’t until ColdFusion 8 that the language added support for post-increment and overloaded assignment operators. Before that if I wanted to increment a variable I had to write:
<cfset Variables.SomeValue = Variables.SomeValue + 1>
<cfset Variables.SomeValue = IncrementValue(Variables.SomeValue)>
Finally, after version 8.
<cfset Variables.SomeValue += 1>
<cfset Variables.SomeValue++>
I mean, even QBASIC had these operators. Another example of how behind ColdFusion is compared to other languages.
In my opinion, tag-based back-end languages are a thing of the past. Most tag-based languages are used for simple markup on the front-end (e.g. HTML, XML). They thrive on the front-end, but fall short on the back-end. They are unweildy in that capacity. I believe ColdFusion has reached that critical mass. Developer’s require more elegant solutions, and ColdFusion is not up to the challenge.
This leads me to my second big complaint of ColdFusion, Not Object Oriented. ColdFusion does have the concept of a <cfobject> created from a <cfcomponent> (among others). These are primitive stages and only recently was support for core OO principles such as inheritance added. OOP has been around since the early 1970′s and has taken off on the web with the rise of MVC (also from the 1970′s). It’s sad to think that a language, even by version 8, doesn’t support OOP these days. Unfortunately, ColdFusion isn’t the only one.
ColdFusion is the limited array support also stiffles me. Admittedly this is not as strong a point as the others. Nonetheless, it fits the bill. Array’s are a basic data structure of all launguages. Although ColdFusion does have arrays, they are not used by core features. ColdFusion uses Lists instead. A ColdFusion List, essentially, stores a delimited string. Most functions and tags accept or return lists. Whenever ColdFusion abandoned arrays and went their own way with lists they made a mistake. They turned their back on developers using a fundamental data structure.
Inconsistent Behavior
Every language deals with consistency issues. The order of arguments for a List function differs from String function. ColdFusion is no different. But there is a specific set of display features in ColdFusion that in all my experience I can’t explain. I have submitted bug reports, emailed user groups, asked speakers at Adobe Max and CFObjective. Nothing. I open to the possibility that maybe some else is wrong in my code. But one would like to think that after all the steps above such an explanation would have been provided.
cfoutput and cfloop
Output in ColdFusion has always been a finicky beast. The amount of whitespace left from the original markup is annoying in itself. Configuration options exist, but it’s really a choice between the lesser of two evils. I suppose you could litter your code with <cfoutput> only where you needed dynamic data. But that seems pretty tedious. Whitespace aside, <cfoutput> is an also finicky. It is a tag that you can or can’t nest depending on the data you wish to output. If you add the group attribute, well, good luck. But the one that takes the cake is a combination of <cfoutput>, <cfloop>, and <cfquery>
cfdocument
<cfdocument> is the nail in the coffin for ColdFusion. As much potential as this tag has, to output content to PDF/Flash Paper, it is horrible. For me, this single tag embodies the entire language. ColdFusion Team developers have openly cursed this tag in talks and screencasts. I know any developer that has attempted to use this tag for even a slightly complex task agrees with me. As such, I won’t waste time explaining all bugs. Since the existence of this tag, there are 3 issues that no amount of configuration, markup, upgrades, bug report, or development insight has solved.
- Caching issues. Even with a fresh cache and URL GUID stale content will output for more complex
<cfdocument>tasks. A refresh displays the latest. - Headers and Footers do not work according to ColdFusion 8 Spec, even when using
<cfdocumentsection>. Instead the last set of headers/footers overwrite all. - At normal zoom, the font is randomly larger/small than the specified size when outputting even the simplest HTML in PDF format. Tested in several browsers and platforms.
A New Hope
ColdFusion really could turn around. Yes, I have been complaining about it for several paragraphs. Indeed, I feel they are all good points. Yet, I give ColdFusion due credit in a few areas.
- Easy to learn, easy to use
- Straightforward error handling
- The concept of an Application scope is intuitive
- Native PDF support
- Recent increases in the ability to leverage Java directly in you ColdFusion code.
These last two items are where ColdFusion could really shine and overcome a majority of the issues I mentioned above.
Java is an object oriented language. There is no excuse for ColdFusion not to leverage or expose this native support. After all, "ColdFusion is Java". At least that is what I keep hearing in conference talk directly from the CF Team. So I should be able to write Firstname.substr() or access a custom Java class. You can do these things now, but you have to instantiate a Java object or package you Java classes. Make it seamless. Make <cfjava> It may be messy, but allow some kind of hybrid interface.
ColdFusion has supported native PDF generation for some time now. Albeit buggy as mentioned above. But this is a really nice feature for a web language to have out of the box. When Adobe bought Macromedia, I had high hopes for features like Flash integration or image manipulation. I thought at least the <cfdocument> issues would be fixed. No, they spend time on tags like <cfwindow>, <cfajaximport>, etc. Why is a back-end language wasting time on front-end technology? In my opinion, this was a silly attempt to bring a dated language up to speed by integrating some of the latest web trends. <cfpdf> did come out. But it primarily manages existing documents. Adobe has a great product line, so let’s see some synergy between products. Please though, now under Adobe at least fix features involving their trademark PDF.
Closing
Until ColdFusion addresses the items above, they don’t stand a chance at evolving. ColdFusion will become exactly that cold, as in dead. They could be an enterprise web language. Maybe not a contender with .NET, but most organizations still haven’t taken that leap to open-source technologies. For whatever reason, they don’t view them as grown up or supported. With ColdFusion now under Adobe’s product line, that could provide an edge. And that is exactly it. If they took full advantage of their partnerships with Adobe and Java, the language would have much more potential.
No offence here, but you’re judging a language based on half an understanding.
What do I care, though? You didn’t bother to learn CF properly, so you don’t know of half the features that counter virtually every single word in your post..
CF doesn’t have the option to step into Java mode? Oh, bugger, I’d better edit my code that does just that – ‘cos apparently it’s impossible.
Same with white-space suppression – go look up CFPROCESSINGDIRECTIVE.. Has a boolean attribute by the name of suppresswhitespace..
Don’t want it application wide? OK, run your code that doesn’t output into CFSILENT.
I see your problem, though – you’re too busy spouting about flaws that don’t exist to learn that ColdFusion has a number of ways to skin the same cat.
Enjoy your life..
Chris,
Wow, I know the weather sucks in London, but man, chipper up. I mean that feedback was a bit harsh.
In fairness, let’s review your points.
First, I never said you can’t use Java with ColdFusion. I actually stated this as a strength of the language in its latest versions. One that I suggested should be more prevalent in future versions. After all, ColdFusion IS Java.
Second, maybe you need to review how CFProcessingDirective and CFSilent work in practice. There is still whitespace left from ColdFusion code. There’s also a setting in CFAdministrator pertaining to whitespace. So, trust me, I have tried. Bottom line, a language should clean up after itself by default. It should not take a magical combination of settings.
Finally, I am an Adobe Certified ColdFusion Developer using ColdFusion as a Senior Applications Developer for over 3 years. But I am no expert. I never claimed to be. I am only sharing my opinions. Furthermore, I have shared these opinions with the ColdFusion Core Team, even Ben Forta himself. I’ll even go so far as to say a few agreed with me on certain topics.
In closing, I do appreciate your feedback. However, code samples or resources would have been much more valuable than personal attacks. Something to think about in the future.
Cheerio!
As far As i am Concerned, CF is Good from all prospective! I made evrybit of Application in CF and here are there Plus Points
1. Easy Integration with external Services, webservices AND API
2. Took much lesse time to Build The Project.
3. Flawless Inntegration of Flash Forms
4. Multi Lingual
5. Social Networking in a go
5. Last and not the Least, Image Processing which is awesome and great which i cannot find anywhere else except JSP
The great thing about blogs is that even two+ years after you post something, it can and should come back to bite you.
Even in your original argument, you were incorrect about a number of things, or falling prey to the mindset that certain practices, such as OOP or MVC, should be ubiquitous.
#1…at the time you wrote this, you were wrong about the limitations of CFScript. In version 8, many of the core CF functions had already been matched by a script equivalent. The one element that did not carry over was creation and execution of database activity, other than the handling of data prior to or after it is acquired. CFScript was never intended, from then until now, to be a replacement for CFML. It was about extensibility. You seem sensitive to perceived personal attacks, but I chalk this up to a lack of experience or know-how with the language if merely the inability to ensconce tags in a cfscript block is a limiting factor for you.
#2…you were incorrect, by a couple of versions even, about the limitations of arrays in ColdFusion. There are examples dating to the initial release of MX that underscore how very incorrect you were. Arrays and strong programmatic support for arrays have and remain there. Many developers, including Forta, have demonstrated time and again how useful and extensible ColdFusion arrays are, and how much faster their use is over queries. This makes your reply to the previous commenter, including your "Forta himself" credibility grab, largely dubious. You also omit Coldfusion’s structure, which is extremely complex and robust. Was in 2008, was in 2006, and is robust in 2010. Folks who want to cling solely to CFML are not the class of developers that will derive benefit from structures or arrays, but there are plenty of strong examples of applications that navigate both using the aggregate of ColdFusion’s methodologies.
White space is also highly manageable. Code that cleans up after itself? Worked in PHP much? It’s all about best practices, friend. Every language has its quirks, and every platform has its quirks.
The irony is that the shortcomings you mention are the plebeian challenges that capable developers have either overcome or wrought extensions to overcome. At its introduction, cfdocument and cfpdf, with their flaws, also enjoyed many commercial applications that belie your concerns. CF9 has even further opened the flood gates.
At the time you wrote this, too, in the background were (and remain) a number of open source CFML projects that continue to succeed. OOP and MVC notwithstanding, there is room in the development world for departures from common conventions. Hopefully, since you wrote this, you’re perspective has matured rather than crystallized.
You may ask, why comment on a blog post two years stale? A) It came up on a search for cfwindow and cfscript together, as I was looking for a mechanism in CF8 to address window attributes via CFScript and B) your glamorously incorrect post should serve self-referentially as a cautionary tale against posting material that may diminish your professional credibility. You post your opinion under your own name, and then you have to declare you are not an expert to justify sharing your opinion. How does this serve your own interest?
I hope you never find yourself in a circumstance where an employer is pitching ColdFusion to a client on a project to which you are attached, and *you* have to explain why this comes up under a Google search, perhaps, of your name.
Opinions are often wrong. If I were you, I would make very sure you know what you are talking about before you post such things in the future.
BK,
Thanks for the feedback. As you pointed out many times, I wrote this article years ago. But that doesn’t change my opinion of the language. You are entitled to your own – that I am wrong. Fair, let’s look at your points.
Number 1: You repeated what I said –
<cfscript>supports CF functions. You even went on to note specific CF tags they did not support<cfquery>. Seems like we’re in agreement.Number 2: I agree CF structures are a great language data type. But they should not entirely replace a fundamental data type such as arrays. Sorry, but lists – string based delimited sets – are a joke. But they probably wouldn’t be as bad if ColdFusion had native arrays. If pompousness exists here, it’s on ColdFusion’s side.
As for the miscellaneous points. Any scalable site requires performance optimizations that deal with minification. So white-space is indeed a point, albeit small. Why do you think Google minifies their HTML? Completely agree on coding standards and agree they are a routine of a good developer. But unless you are coding unindented or on a single line I guarantee ColdFusion is leaving artifacts behind.
The bottom line is I expected more from a so-called enterprise level language in it’s eighth version. Furthermore, as a multi-language developer, I found it interesting that I never used ColdFusion outside of employment. Hence the article.
In the end, I think there are two takeaways. First, you finding this old article as a top search result isn’t a very good testament to that fact that ColdFusion is not a dead language. Second, you really didn’t offer anything compelling beyond personal attack. I realize I am crapping on your language of choice and therefore putting a target on my back. But I am comfortable with that and stand by my opinion.
Hi!
My business partner and I, we often hear that ColdFusion is about to be dead. We don‘t believe that and that’s the reason why we started to write a book – http://www.cfsinfonie.ch
At the first step it‘s a wiki and only in German.
We hope that you will have as much fun reading CF Sinfonie as we had with writing it. We would really appreciate your feedback – let‘s keep ColdFusion alive!
Best regards.
It’s evidence for both sides that this post, after 4 years, still receives comments…