Whatever message this page gives is out now! Go check it out!

Selecting among ColdFusion code reuse methods

Last update:
Jun 9, 2026
The following table lists common reasons to employ code reuse methods and indicates the techniques to consider for each purpose. The letter P indicates that the method is preferred. (There can be more than one preferred method.) The letter A means that the method provides an alternative that is useful in some circumstances.
This table does not include CFX tags. You use CFX tags only when it is best to code your functionality in C++ or Java. For more information about using CFX tags, see Using CFX tags.
Purpose
cfinclude tag
Custom tag
UDF
Component
Provide code, including CFML, HTML, and static text, that must be used in multiple pages.
P
Deploy headers and footers.
P
Include one page in another page.
P
Divide pages into smaller units.
P
Use variables from a calling page.
A
P
P
Implement code that uses recursion.
P
P
P
Distribute your code to others.
P
P
P
Operate on a body of HTML or CFML text.
P
Use subtags.
P
Provide a computation, data manipulation, or other procedure.
A
P
Provide a single functional element that takes any number of input values and returns a (possibly complex) result.
A
P
Use variables with names that change from use to use.
A
P
P
Provide accessibility from Flash clients.
A
A
P
Use built-in user security features.
A
P
Encapsulate multiple related functions and properties.
P
Create web services.
P
Implement object-oriented coding methodologies.
P

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page