About reusable CFML elements
ColdFusion provides you with several types of reusable elements, sections of code that you can
create once and use multiple times in an application. Many of these elements also let you extend
the built-in capabilities of ColdFusion. ColdFusion provides the following reusable CFML
elements:
•
ColdFusion pages you include using the
•
User-defined functions (UDFs)
•
Custom CFML tags
•
CFX (ColdFusion Extension) tags
•
ColdFusion components
The following sections describe the features of each of these elements and provide guidelines for
determining which of these tools to use in your application. Other chapters describe the tools in
detail. The last section in this chapter includes a table that helps you chose among these
techniques for different purposes.
ColdFusion can also use elements developed using other technologies, including the following:
•
JSP tags from JSP tag libraries
For information on using JSP tags, see
CFML Applications," on page
•
Java objects, including objects in the Java runtime environment and JavaBeans
For information on using Java objects, see
CFML Applications," on page
•
Microsoft COM (Component Object Model) objects
For information on using COM objects, see
Objects in CFML Applications," on page
•
CORBA (Common Object Request Broker Architecture) objects
For information on using CORBA objects, see
Objects in CFML Applications," on page
•
Web services
For information on using web services, see
Including pages with the cfinclude tag
The
cfinclude
code on the included page were part of the page that uses the
"write once use multiple times" strategy for ColdFusion elements that you incorporate in multiple
pages. Instead of copying and maintaining the same code on multiple pages, you can store the
code in one page and then refer to it in many pages. For example, the
commonly used to put a header and footer on multiple pages. This way, if you change the header
or footer design, you only change the contents of a single file.
164
Chapter 8: Reusing Code in ColdFusion Pages
735.
735.
tag adds the contents of a ColdFusion page to another ColdFusion page, as if the
tag
cfinclude
Chapter 33, "Integrating J2EE and Java Elements in
Chapter 33, "Integrating J2EE and Java Elements in
Chapter 34, "Integrating COM and CORBA
761.
Chapter 34, "Integrating COM and CORBA
761.
Chapter 32, "Using Web Services," on page 707
cfinclude
tag. It lets you pursue a
tag is
cfinclude
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers