Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFScript deprecation question

Community Beginner ,
Dec 17, 2021 Dec 17, 2021

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,

945
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Dec 17, 2021 Dec 17, 2021

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

...
Translate
Adobe Employee ,
Dec 17, 2021 Dec 17, 2021

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:

 

PriyankShrivastava_0-1639769439261.pngexpand image

 

 

Thanks,
Priyank Shrivastava
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2021 Dec 17, 2021

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();
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 17, 2021 Dec 17, 2021

You can give it a try and see if it breaks anything.

 

 

Thanks,
Priyank Shrivastava
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2021 Dec 17, 2021

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2021 Dec 18, 2021
quote

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 18, 2021 Dec 18, 2021

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2021 Dec 18, 2021
quote

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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2021 Dec 19, 2021
LATEST

@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. 

 

 

 

 

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources