Content deleted Content added
Replaced redirect with CFML (disambiguation) |
m →ColdFusion Components (CFCs): {{tag}} |
||
(25 intermediate revisions by 18 users not shown) | |||
Line 1:
{{Short description|Scripting language for web development}}
{{redirect|CFML|other uses}}
{{Infobox programming language
| name
| logo
| paradigm
| year = {{Start date and age|1995}}▼
| developer
▲| designer = [[Jeremy Allaire]]
▲| developer = [[Adobe Systems]] ([[ColdFusion]]), Lucee Association ([[Lucee]]), [[New Atlanta]] and aw2.0 ([[openBD]]), The Railo Company ([[Railo]])
| latest release version = 2023 Release
| latest release date = {{Start date and age|2023}}
| latest preview version =
|
| typing
| implementations
| dialects
▲| file ext = .cfm, .cfc
▲| programming language = [[Java (programming language)|Java]]
| license
▲| operating system = [[Cross-platform]]
▲| license = Depends on the implementation. [[Proprietary software|Proprietary]], [[LGPL]], and [[GPL]]-licensed engines are all available.
| influenced by =
▲| website = {{URL|http://www.adobe.com/products/coldfusion}}
| influenced
}}
'''ColdFusion Markup Language''', more commonly known as '''CFML''', is a [[server-side scripting|scripting language]] for web development that runs on the [[
== Synopsis ==
In its simplest form, like many other web scripting languages, CFML augments standard [[HTML]] files with [[database]] commands, conditional [[Operator (programming)|operators]], high-level formatting [[function (computer science)|functions]], and other elements to produce [[web applications]].<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_09.html Adobe ColdFusion 8 – About Internet applications and web application servers] {{Webarchive|url=https://web.archive.org/web/20120513034624/http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_09.html |date=2012-05-13
CFML can be written using either tags or [[CFScript]], which resembles [[JavaScript]]
The pages in a CFML [[Application software|application]] include the [[server-side]] CFML tags and functions in addition to HTML tags
CFML can also be used to generate other languages, aside from HTML, such as [[XML]], [[JavaScript]], [[CSS]], and so on.
Line 36 ⟶ 37:
Despite the name, CFML is ''not'' a markup language. It is also not [[SGML]], since certain core CFML features prevent it from complying.
The CFML engine is configured in such a way that certain file extensions on the server (.cfm, .cfc) are handed off to the CFML engine for processing. In the case of the Java-based engines this is accomplished via [[Java servlet]]s. The CFML engine only processes CFML tags and functions; it returns text outside of CFML tags and functions to the [[web server]] unchanged.<ref>[http://livedocs.adobe.com/coldfusion/6.1/htmldocs/element4.htm Tags] {{webarchive |url=https://web.archive.org/web/20080324005624/http://livedocs.adobe.com/coldfusion/6.1/htmldocs/element4.htm |date=March 24, 2008
== History ==
Named Cold Fusion at the outset, the software was created in 1995 by the [[Allaire Corporation]], originally located in [[Minnesota]]. It later moved to Cambridge, Massachusetts and then finally to Newton, Massachusetts before being acquired by [[Macromedia]] in 2001. Allaire Cold Fusion thus became Macromedia Cold Fusion.
In 1998 Alan Williamson and his Scottish company, "n-ary", began creating a templating engine for Java to simplify common programming tasks.<ref>[https://web.archive.org/web/20100917122859/http://alan.blog-city.com/interview_alanwilliamson.htm Open BlueDragon Steering Committee Interview Series – Alan Williamson]. alan.blog-city.com</ref> Williamson was using curly-brace notation instead of tags, but when he saw an example of CFML and how it was solving similar problems (although not in Java) using a tag syntax, he started developing what would eventually become BlueDragon, which was the first Java implementation of the CFML language. (ColdFusion was written in [[C (programming language)|C]] and [[C++]] until version 6.0
The Railo CFML engine began as a student project in 2002 and was first launched as a commercial project in 2005.<ref>[http://www.getrailo.org/index.cfm/about-railo/ About Railo] {{Webarchive|url=https://web.archive.org/web/20110630010231/http://www.getrailo.org/index.cfm/about-railo/ |date=2011-06-30
On June 18, 2009, [[Adobe Systems|Adobe]] announced at the CFUnited conference that it had formed a CFML Advisory Committee<ref>http://corfield.org/entry/CFML_Advisory_Committee {{Webarchive|url=https://web.archive.org/web/20090107042428/http://corfield.org/entry/CFML_Advisory_Committee |date=2009-01-07
In 2012, the OpenCFML Foundation was launched. Its function is to push [[open-source software|open-source]] CFML applications and platforms.
Former Railo lead developer Michael Offner launched [[Lucee]], a fork of
In 2025, CFML was still in use. Lucee will hold a CFML conference, CFCAMP, on May 22-23, 2025.<ref>{{Cite web |last=Spitzer |first=Zac |date=April 1, 2025 |title=CFCAMP 2025, May 22nd & 23rd, Munich, Germany |url=https://dev.lucee.org/t/cfcamp-2025-may-22nd-23rd-munich-germany/14926 |access-date=April 22, 2025}}</ref> The Adobe ColdFusion Summit 2025 is to be held September 21-24, 2025.<ref>{{Cite web |date=April 22, 2025 |title=Adobe ColdFusion Summit 2025 |url=https://cfsummit.adobeevents.com/ |access-date=April 22, 2025}}</ref>
== Syntax ==
Line 62 ⟶ 65:
<cfset value = "Hello" />
</syntaxhighlight>
Even if the tag can have a body, including a body may not be necessary in some instances because the attributes specify all the required information. In these cases, as with the second example above, the end tag (and hence, the tag body) may be omitted and the tag may be self-closing as in the following example:<ref>[http://livedocs.adobe.com/coldfusion/6.1/htmldocs/element5.htm Tag syntax] {{webarchive |url=https://web.archive.org/web/20080527095947/http://livedocs.adobe.com/coldfusion/6.1/htmldocs/element5.htm |date=May 27, 2008
<syntaxhighlight lang="cfm">
<cfexecute name="C:\\winNT\\System32\\netstat.exe" arguments="-e" outputfile="C:\\Temp\\out.txt" timeout="1" /></syntaxhighlight>
Line 69 ⟶ 72:
== Built-in tags ==
Nearly 100 tags and many more functions make up the heart of the CFML language. The following lists CFML tags by their function or purpose.<ref>[http://livedocs.adobe.com/coldfusion/8/cf8_cfml_ref.pdf Tags by function] {{Webarchive|url=https://web.archive.org/web/20080509064817/http://livedocs.adobe.com/coldfusion/8/cf8_cfml_ref.pdf |date=2008-05-09
*Application framework
*Communications
*Control
**[[Flow control construct|Flow-control]]
**Database manipulation
**[[Exception handling]]
Line 82 ⟶ 85:
*[[File management]]
*[[Form (web)|form]]
*[[Internet
*Page processing
*[[Security]]
Line 114 ⟶ 117:
{| class="wikitable sortable"
|-
!Function
!Reference
!Code
|-
|[[Array data structure|Array]]
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_03.html#3473387 Array functions] {{Webarchive|url=https://web.archive.org/web/20081210235527/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_03.html#3473387 |date=2008-12-10
|-
|Conversion
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_04.html#1098761 Conversion functions] {{Webarchive|url=https://web.archive.org/web/20081208084545/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_04.html#1098761 |date=2008-12-08
|-
|Date and time
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_05.html#1098968 Date and time functions] {{Webarchive|url=https://web.archive.org/web/20081202132915/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_05.html#1098968 |date=2008-12-02
|-
|Decision
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_06.html#3485787 Decision functions] {{Webarchive|url=https://web.archive.org/web/20090201085009/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_06.html#3485787 |date=2009-02-01
|-
|Display and formatting
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_07.html#1099219 Display and formatting functions] {{Webarchive|url=https://web.archive.org/web/20081220025858/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_07.html#1099219 |date=2008-12-20
|-
|Dynamic evaluation
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_08.html#1099242 Dynamic evaluation functions] {{Webarchive|url=https://web.archive.org/web/20081207195449/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_08.html#1099242 |date=2008-12-07
|-
|Extensibility
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_09.html#3490127 Extensibility] {{Webarchive|url=https://web.archive.org/web/20090214041738/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_09.html#3490127 |date=2009-02-14
|-
|[[Image]]
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_11.html#1099325 Image functions] {{Webarchive|url=https://web.archive.org/web/20090131150931/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_11.html#1099325 |date=2009-01-31
|-
|International functions
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_12.html#3614227 International functions] {{Webarchive|url=https://web.archive.org/web/20090208230052/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_12.html#3614227 |date=2009-02-08
|-
|[[List (computing)|List]]
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_13.html#1099435 List functions] {{Webarchive|url=https://web.archive.org/web/20081210235531/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_13.html#1099435 |date=2008-12-10
|-
|Mathematical
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_14.html#1099613 Mathematical functions] {{Webarchive|url=https://web.archive.org/web/20081207130216/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_14.html#1099613 |date=2008-12-07
|-
|Other functions
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_15.html#3493621 Other functions] {{Webarchive|url=https://web.archive.org/web/20090130043707/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_15.html#3493621 |date=2009-01-30
|-
|Query
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_16.html#1099653 Query functions] {{Webarchive|url=https://web.archive.org/web/20090221144556/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_16.html#1099653 |date=2009-02-21
|-
|Security
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_17.html#3542210 Security functions] {{Webarchive|url=https://web.archive.org/web/20081205034546/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_17.html#3542210 |date=2008-12-05
|-
|[[String (computer science)|String]]
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_18.html#1099887 String functions] {{Webarchive|url=https://web.archive.org/web/20090129213824/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_18.html#1099887 |date=2009-01-29
|-
|[[Data structure|Structure]]
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_19.html#1099964 Structure functions] {{Webarchive|url=https://web.archive.org/web/20090214023833/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_19.html#1099964 |date=2009-02-14
|-
|[[System]]
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_20.html#1100017 System functions] {{Webarchive|url=https://web.archive.org/web/20090201064841/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_20.html#1100017 |date=2009-02-01
|-
|[[XML]]
|<ref>[http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_21.html#3468770 XML functions] {{Webarchive|url=https://web.archive.org/web/20090220221246/http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_21.html#3468770 |date=2009-02-20
|}
== ColdFusion Components (CFCs) ==
CFCs provide some (not all) of the typical features and functionality that are provided by [[Object-oriented programming|object-oriented]] (OOP) languages.
To create a CFC:
:Create a file with a .CFC extension (this distinguishes CFCs from ColdFusion templates, which have a .CFM extension).
:Use four tags to create the components, define their functions and [[arguments]], and return a value.
:
:
:
:
CFCs are plain CFML. Within a CFC any CFML tag, function, custom tag, other components, etc. may be used.
CFCs can be used in various ways. If a method contained in a CFC simply needs to be invoked, the
CFCs are created using four tags, saved as .CFC files, and invoked using the
In the example below, component temperature.cfc has a method FtoC which converts temperature from Fahrenheit to Celsius. The test.cfm template invokes the method and converts 212 degrees Fahrenheit and outputs the result.
Line 211 ⟶ 214:
CFCs also form the basis of the ability to create [[web services]] in CFML. A CFC is created in the usual way, and the attribute access="remote" added to any function within the CFC will make that function available to be called as a [[SOAP]]-based web service. The CFML engine auto-generates a [[Wsdl|WSDL]] and creates all the necessary stubs for the web service to function.
== Security updates ==
Adobe releases security patches for ColdFusion as needed, typically in response to identified vulnerabilities. These updates address critical issues such as [[arbitrary code execution]] and security feature bypasses. For instance, on December 23, 2024, Adobe released updates for ColdFusion 2023 and 2021 to resolve a critical vulnerability that could lead to arbitrary file system read.
To stay informed about the latest security updates, users should regularly check Adobe's official ColdFusion security bulletins. Additionally, subscribing to Adobe's security notification service ensures timely alerts about new patches and vulnerabilities. Implementing these updates promptly is crucial to maintaining the security and integrity of ColdFusion applications.
== References ==
Line 216 ⟶ 223:
==External links==
* [https://cfdocs.org/ CFML documentation maintained by the community
* [https://github.com/mhenke/CFML-in-100-minutes/blob/develop/cfml100mins.markdown CFML in 100 minutes — introduction to the basics of the CFML language.]
* [http://learncfinaweek.com/ A community driven training program that teaches the basics of CFML.]
* [http://cfml-slack.herokuapp.com/ CFML Slack team]
* [http://www.cfquickdocs.com/ CFQuickDocs — ColdFusion tags and functions reference.]
* [http://lucee.org/ Lucee]
* [http://openbd.org/ Open BlueDragon]
* [http://www.newatlanta.com/products/bluedragon/product_info/overview.cfm BlueDragon]
* [http://getrailo.com/ Railo]
* [https://groups.google.com/group/cfml-conventional-wisdom CFML Conventional Wisdom Google Group]
* [https://web.archive.org/web/20090204105406/http://www.opencfml.org/ CFML Advisory Committee] (this committee is now defunct)
Line 231 ⟶ 238:
[[Category:CFML programming language]]
[[Category:Domain-specific programming languages]]
|