Copy link to clipboard
Copied
In this post about the 2021 release (https://helpx.adobe.com/coldfusion/deprecated-features.html) it is mentioned that "cfscript support for script-based CFCs, such as query and storedproc." I can't find anything that clarfies what that means. My organization has applications that use pure script based CFCs and ones that mix tags and script inside CFSCRIPT tags. What precisely is being deprecated?
Thanks,
1 Correct answer
Hi,
These are the CFCs that we ship with ColdFusion. We implemented these CFCs so that customers can use functionalities like FTP, HTTP etc. directly in CFSCRIPT tag instead of their tag based counterpart. With ColdFusion 11, we introduced the generic syntax so now customers can use all the tags inside CFSCRIPT tag.
It has no impact on user created CFCs. It just that if you are using one of these CFC files listed below and if you are facing any issue, then we will not support it.
Here’s th
...Copy link to clipboard
Copied
Hi,
These are the CFCs that we ship with ColdFusion. We implemented these CFCs so that customers can use functionalities like FTP, HTTP etc. directly in CFSCRIPT tag instead of their tag based counterpart. With ColdFusion 11, we introduced the generic syntax so now customers can use all the tags inside CFSCRIPT tag.
It has no impact on user created CFCs. It just that if you are using one of these CFC files listed below and if you are facing any issue, then we will not support it.
Here’s the list of CFCs that we have deprecated:
Priyank Shrivastava
Copy link to clipboard
Copied
To be absolutely sure then this code should continue to work even if you eventually removed the CFCs.
httpService = new http();
httpService.setMethod("post");
httpService.setCharset("utf-8");
httpService.setUrl(urlTxt);
httpService.setGetAsBinary("yes");
httpService.addParam(type="header", name="Accept", value="application/octet-stream");
httpService.addParam(type="body", value=generateToken());
httpResponse = httpService.send().getPrefix();
Copy link to clipboard
Copied
You can give it a try and see if it breaks anything.
Priyank Shrivastava
Copy link to clipboard
Copied
I know that this code currently works. What I'm asking is verification that this is not using the CFC that is deprecated but is using the correct syntax that will continue to function even if the HTTP.CFC is removed or fails for some reason.
Copy link to clipboard
Copied
I know that this code currently works. What I'm asking is verification that this is not using the CFC that is deprecated but is using the correct syntax that will continue to function even if the HTTP.CFC is removed or fails for some reason.
By shawnm77282953
The question you're asking cannot really be answered. That is because ColdFusion has two traditions that can at times be mutually contradictory, namely, deprecation and backward-compatibility. It means that a CFC that has been deprecated may continue to work. What I would say is, to be on the safe side, stop using a CFC - or any ColdFusion functionality, for that matter - that Adobe has deprecated.
Copy link to clipboard
Copied
Let me rephrase this then. Is this code using the CFC and if so what is the alternative? Unfortunately I don't get to code much in CF any more but do have maintainance duties on some applications and want to be forward thinking about possible changes.
Copy link to clipboard
Copied
Let me rephrase this then. Is this code using the CFC and if so what is the alternative? Unfortunately I don't get to code much in CF any more but do have maintainance duties on some applications and want to be forward thinking about possible changes.
By shawnm77282953
Ah, I now understand. There is nothing for you to worry about. Your code,
new http()
is simply the cfscript version of the tag <cfhttp>.
So, it is certainly not deprecated.
Copy link to clipboard
Copied
@shawnm77282953 , I am sorry I shall have to correct myself. When I looked into the documentation some more, I saw that HTTP.cfc is indeed deprecated. With effect from ColdFusion 2018 onwards.
However, ColdFusion also has a tradition of maintaining backward-compatibility. So you may continue to use
new http();
At least now and in the near future. But beware of what Priyank said:
"It just that if you are using one of these CFC files listed below and if you are facing any issue, then we will not support it."
In ColdFusion 2018 or 2021, you will find the full list of such deprecated CFCs at
{CF_INSTALLATION_DIRECTORY}\cfusion\CustomTags\com\adobe\coldfusion
If I were using any, I would already be planning a replacement with non-deprecated alternatives. For example,
cfhttp();
in place of
new http();
Adobe confuses matters by listing a whole library of CFCs as deprecated: (https://helpx.adobe.com/coldfusion/deprecated-features.html - "cfscript support for script-based CFCs, such as query and storedproc" - yet mentioning nothing about deprecation in the documentation of the individual CFCs. For example, the Adobe documentation on the HTTP CFC (https://helpx.adobe.com/coldfusion/cfml-reference/script-functions-implemented-as-cfcs/http.html), updated as recently as April 27, 2021, mentions nothing about deprecation.

