This section provides information that will help you use user-defined functions more effectively.
Using functions in ColdFusion component
In many cases, the most effective use of UDFs is within a CFC. For more information on CFCs, see Building and Using ColdFusion Components.
Using Application.cfm and function include files
Consider the following techniques for making your functions available to your ColdFusion pages:
- If you consistently call a small number of UDFs, consider putting their definitions on the Application.cfm page.
- If you call UDFs in only a few of your application pages, do not include their definitions in Application.cfm.
- If you use many UDFs, put their definitions on one or more ColdFusion pages that contain only UDFs. You can include the UDF definition page in any page that calls the UDFs.
The next section describes other techniques for making UDFs available to your ColdFusion pages.