HOME

TheInfoList



OR:

ColdFusion Markup Language, more commonly known as CFML, is a
scripting language In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
for web development that runs on the
Java virtual machine A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally descr ...
(JVM), the
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
framework, and
Google App Engine Google App Engine (also referred to as GAE or App Engine) is a cloud computing platform used as a service for developing and hosting web applications. Applications are sandboxed and run across multiple Google-managed servers. GAE supports aut ...
. Several commercial and
free and open-source software Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
implementations of CFML engines are available, including
Adobe ColdFusion Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995. (The programming language used with that platform is also commonly called ColdFusion, though is more accurately known as C ...
, Lucee, New Atlanta BlueDragon (
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and .NET versions), Railo, Open BlueDragon, and other CFML server engines.


Synopsis

In its simplest form, like many other web scripting languages, CFML augments standard
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
files with
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
commands, conditional operators, high-level formatting functions, and other elements to produce
web applications A web application (or web app) is application software that is created with web technologies and runs via a web browser. Web applications emerged during the late 1990s and allowed for the server to dynamically build a response to the request, ...
. CFML also includes many other constructs including ColdFusion Components (CFCs), CFML's version of objects, that allow separating business logic from presentation. CFML can be written using either tags or CFScript, which resembles
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
(
ECMAScript ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
). The pages in a CFML application include the server-side CFML tags and functions in addition to HTML tags. Modern CFML applications also tend to have CFCs that are accessed by the CFML pages for executing business logic. When a
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
requests a page in a ColdFusion application, it is automatically pre-processed by the ColdFusion
application server An application server is a server that hosts applications or software that delivers a business application through a communication protocol. For a typical web application, the application server sits behind the web servers. An application ser ...
. CFML can also be used to generate other languages, aside from HTML, such as
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
,
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
, CSS, and so on. Despite the name, CFML is ''not'' a markup language. It is also not
SGML The Standard Generalized Markup Language (SGML; International Organization for Standardization, ISO 8879:1986) is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on t ...
, 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 A Jakarta Servlet, formerly Java Servlet is a Java (programming language), Java software component that extends the capabilities of a server (computing), server. Although servlets can respond to many types of requests, they most commonly impl ...
s. The CFML engine only processes CFML tags and functions; it returns text outside of CFML tags and functions to the
web server A web server is computer software and underlying Computer hardware, hardware that accepts requests via Hypertext Transfer Protocol, HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, co ...
unchanged.


History

Named Cold Fusion at the outset, the software was created in 1995 by the Allaire Corporation, originally located in
Minnesota Minnesota ( ) is a U.S. state, state in the Upper Midwestern region of the United States. It is bordered by the Canadian provinces of Manitoba and Ontario to the north and east and by the U.S. states of Wisconsin to the east, Iowa to the so ...
. It later moved to Cambridge, Massachusetts and then finally to Newton, Massachusetts before being acquired by
Macromedia Macromedia, Inc. was an American graphics, multimedia, and web development software company headquartered in San Francisco, California, that made products such as Adobe Flash, Flash and Adobe Dreamweaver, Dreamweaver. It was purchased by its riv ...
in 2001. Allaire Cold Fusion thus became Macromedia Cold Fusion. At the release of version 4, the space in the name was removed to become ColdFusion. Adobe acquired Macromedia in 2005. , it is still actively developing ColdFusion. In 1998 Alan Williamson and his Scottish company, "n-ary", began creating a templating engine for Java to simplify common programming tasks. 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 and C++ until version 6.0, the first Java-based version, was released in 2002.) New Atlanta licensed BlueDragon around 2001 and made it available as a commercial product, eventually creating a
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
implementation of CFML. Open BlueDragon is a fork of the commercial BlueDragon product and was first released in 2008. The Railo CFML engine began as a student project in 2002 and was first launched as a commercial project in 2005. Railo announced they were making the engine open source in 2008, and the first open source version was released in 2009. On June 18, 2009,
Adobe Adobe (from arabic: الطوب Attub ; ) is a building material made from earth and organic materials. is Spanish for mudbrick. In some English-speaking regions of Spanish heritage, such as the Southwestern United States, the term is use ...
announced at the CFUnited conference that it had formed a CFML Advisory Committee that would be responsible for guiding and reviewing changes to the CFML language. This effort was disbanded in 2010. The Google Group CFML Conventional Wisdom was created as a forum for open, public discussions about language and engine features; its use has dwindled since 2011. In 2012, the OpenCFML Foundation was launched. Its function is to push
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
CFML applications and platforms. Former Railo lead developer Michael Offner launched Lucee, a fork of Railo, in London on January 29, 2015. Backed by community supporters and members of the Lucee Association, the goal of the project is to provide the functionality of CFML using fewer resources, giving better performance and to move CFML past its roots and into a modern and dynamic Web programming platform. In 2025, CFML was still in use. Lucee will hold a CFML conference, CFCAMP, on May 22-23, 2025. The Adobe ColdFusion Summit 2025 is to be held September 21-24, 2025.


Syntax

CFML tags have a similar format to HTML tags. They are enclosed in angle brackets (< and >) and generally have zero or more named attributes, though some tags (e.g. cfset, cfif) contain an expression rather than attributes. Many CFML tags have bodies; that is, they have beginning and end tags with text to be processed between them. For example: #value# Bob! Other tags, such as cfset and cfftp, never have bodies; all the required information goes between the beginning (<) character and the ending (>) character in the form of tag attributes (name/value pairs), as in the example below. If it is legal for tags not to have a body, it is syntactically acceptable to leave them unclosed as in the first example, though many CFML developers choose to self-close tags as in the second example to (arguably) make the code more legible. 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: Various tags offer the ability to type-check input parameters (e.g. cffunction, cfparam, cfqueryparam) if the
programmer A programmer, computer programmer or coder is an author of computer source code someone with skill in computer programming. The professional titles Software development, ''software developer'' and Software engineering, ''software engineer' ...
declares their type specifically. This functionality is used with cfqueryparam to secure web applications and databases from
hacker A hacker is a person skilled in information technology who achieves goals and solves problems by non-standard means. The term has become associated in popular culture with a security hackersomeone with knowledge of bug (computing), bugs or exp ...
s and malicious web requests such as SQL injection.


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. *Application framework *Communications *Control ** Flow-control **Database manipulation **
Exception handling In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
*Data output *
Debugging In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs. For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
*Display management *Extensibility * File management * form *
Internet Protocol The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet. IP ...
*Page processing *
Security Security is protection from, or resilience against, potential harm (or other unwanted coercion). Beneficiaries (technically referents) of security may be persons and social groups, objects and institutions, ecosystems, or any other entity or ...
* Variable manipulation *Other tags (cfimage, cfregistry etc.)


Custom tags

CFML allows language extensions in the form of custom tags, which are tags created by the developer that are not part of the CFML language itself. Custom tags are regular CFML files which are intended to be invoked as tags, although it is possible to treat a template as both a custom tag and a regular template. Custom tags are written in CFML and are typically invoked by prefixing the custom tag's file name with ''cf_'', although there are other ways to invoke custom tags. If a template is invoked as a custom tag, the attributes used to invoke that tag are available within the tag in an ''attributes'' scope and the variables for the calling page are accessible via the ''caller'' scope. For example, if writing a custom tag to perform
addition Addition (usually signified by the Plus and minus signs#Plus sign, plus symbol, +) is one of the four basic Operation (mathematics), operations of arithmetic, the other three being subtraction, multiplication, and Division (mathematics), divis ...
, taking two attributes and adding them together, the tag would be an addition.cfm file which could look like this: Assuming the tag is in the same directory as the file (or in a pre-defined customtags directory), it can be invoked thus: CFX tags are custom tags which are developed using
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
or C++, and are prefixed with cfx_ just like cf_. Java and C++ tags are added to the CFML runtime environment using the CFML engine's administrator or by editing configuration files. On some CFML engines JSP tags can also be included in CFML pages using the tag.


Functions

ColdFusion Markup Language includes a set of functions that you use to perform logical and arithmetic operations and manipulate data.


ColdFusion Components (CFCs)

CFCs provide some (not all) of the typical features and functionality that are provided by
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
(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 An argument is a series of sentences, statements, or propositions some of which are called premises and one is the conclusion. The purpose of an argument is to give reasons for one's conclusion via justification, explanation, and/or persua ...
, and return a value. ::: Defines a CFC ::: Defines the functions (methods) within a CFC ::: Defines the arguments (parameters) that a function accepts ::: Returns a value or result from a function 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 tag will create an instance of the CFC, invoke the desired method, and then destroy the instance of the CFC. takes the name of the component (minus the .cfc extension) and the method to execute. To access any returned data, the RETURNVARIABLE attribute provides the name of a variable to contain whatever the function returns. CFCs are created using four tags, saved as .CFC files, and invoked using the tag.Forta, Be
Using ColdFusion components
adobe.com
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. #fDegrees#°F = #result#°C
CFCs may also be instantiated as objects. Assuming a CFC file called Person.cfc, an instance of this CFC would be instantiated as follows: CFCs also form the basis of the ability to create
web services A web service (WS) is either: * a service offered by an electronic device to another electronic device, communicating with each other via the Internet, or * a server running on a computer device, listening for requests at a particular port over a n ...
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 Soap is a salt (chemistry), salt of a fatty acid (sometimes other carboxylic acids) used for cleaning and lubricating products as well as other applications. In a domestic setting, soaps, specifically "toilet soaps", are surfactants usually u ...
-based web service. The CFML engine auto-generates a 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


External links


CFML documentation maintained by the community

CFML in 100 minutes — introduction to the basics of the CFML language.

A community driven training program that teaches the basics of CFML.

CFML Slack team

CFQuickDocs — ColdFusion tags and functions reference.

Lucee

Open BlueDragon

BlueDragon

Railo

CFML Conventional Wisdom Google Group

CFML Advisory Committee
(this committee is now defunct) {{CFML programming language CFML programming language Domain-specific programming languages