Copy link to clipboard
Copied
Guys, a few questions:
When people talk about ColdFusion, do they refer to CFML or CFScript, or both ?
Also, I heard that CFScript is an analog of JavaScript developed for ColdFusion. If so, does it mean I can use CFScript to replace JavaScript ? Otherwise, when should I use CFScript vs CFML ?
Thanks.
Copy link to clipboard
Copied
ColdFusion is application server software.
CFML is short for Cold Fusion Markup Language. It's the programming language we use to get ColdFusion to do stuff. CFML can be written in tag style, such as:
<cfset x = 2>
cfscript is a tag that allows you to do the same thing slightly differently.
<cfscript>
x = 2;
</cfscript>
Javascript is something else altogether. It uses similar syntax as cfscript, sometimes.
Copy link to clipboard
Copied
tommyonline wrote:
Otherwise, when should I use CFScript vs CFML ?Thanks.
Because you like the look of the CFScript javascript like syntax verse the CFML tag based HTML like syntax. There are a few things that can only be done in CFML, but with each version CFScript gets closer and closer to doing everything CFML does.
Copy link to clipboard
Copied
This is a good question. You've already gotten some good answers but I'll add a bit more here.
ColdFusion is a web application server platform. ColdFusion code is in a language with two different styles (some call them separate languages but I argue they're 2 forms of the same language): ColdFusion Markup Language (CFML), which has a tag-style form, and CFScript, which has a script-style form. So when you're talking about code, you can call it ColdFusion code or you can be more specific and refer to CFML and/or CFScript. But when you're talking about an application that you've written with ColdFusion code and deployed to ColdFusion, you can simply call that a ColdFusion application.
CFScript and JavaScript both have script-style form but you use them for different purposes. If you were to use them in the same ColdFusion page, CFScript would be executed server-side by ColdFusion and JavaScript would be executed client-side by the browser.
As for CFScript vs CFML: as another commenter pointed out, it's largely a matter of choice of which style you prefer, particularly in ColdFusion 9 where you can do just about all the same things in either CFML or CFScript (in previous version of ColdFusion, this is less true with CFML generally having more capability than CFScript).
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more