Reminder - stop using the old CFC-based tags in ColdFusion 11

This post is more than 2 years old.

Earlier last week I was helping someone diagnose a ColdFusion issue when I noticed he was using the old CFC-based tags in cfscript. Specifically:

httpService = new http();
result = LOCAL.httpService.send().getPrefix();

Back around ColdFusion 9 I believe Adobe made CFCs to support a few different tags in cfscript. They were: cfcollection, cfdbinfo, cffeed, cfftp, cfhttp, cfimap, cfindex, cfldap, cfmail, cfpdf, cfpop, cfquery, cfsearch, cfstoredproc, cfstoredprocresult.

I used a few of these quite a bit, and in general they worked ok, but I ran into bugs from time to time. Surprisingly these CFCs are not encrypted. You can find them in an com.adobe.coldfusion folder under your server's CustomTags folder. Because they weren't encrypted, I actually wrote my own fixes from time to time.

But the point is - in ColdFusion 11, you should not be using any of these, and should be using the built-in support for tags in script. The documentation for this may be a bit hard to find. The feature as a whole may be found here: Script support for tags, but as far as I know, none of the wiki pages shows examples of this in regards to individual tags.

Adam Cameron does a good write up about some of the mistakes in Adobe's implementation. I don't agree they are quite as bad as he points out, but I strongly agree that "cf" should have been removed from the calls and the need to pass in a result argument should have been fixed. Maybe ColdFusion 12 will correct that. (Or Luccee. :)

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for HERE Technologies. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA