This chapter does not provide information on how to use or develop a specific application
framework. However, it does discuss how an application's directory structure affects the
application and how you can map the directory structure. For more information on mapping the
application framework, see
Note: For one example of an application framework, see "ColdFusion Methodologies for Content
Management," available at www.macromedia.com/v1/handlers/index.cfm?ID=20750&method=full.
Application-level settings and functions
ColdFusion processes the following two pages, if they are available, every time it processes any
page in the application:
•
The Application.cfm page is processed before each page in the application.
•
The OnRequestEnd.cfm page is processed after each page in the application.
Note: UNIX systems are case-sensitive. To ensure that your pages work on UNIX, always capitalize
the A in Application.cfm and the O, R, and E in OnRequestEnd.cfm.
The Application.cfm page provides a good place to define the application. It can contain the
cfapplication
for all pages in the application. This page defines application-level settings, functions, and
features.
Application-level features include page processing settings, default variables, data sources, style
settings, and other application-level constants, and application-specific custom error pages. When
defined and set on the Application.cfm page, they are available on all pages in the application.
ColdFusion applications can have application-level variables that are not in the Application scope.
For example, every page in an application might have a currentPage variable that identifies the
page. The Application.cfm page can set this variable in the Variables scope, so each page gets a
different, local value. Because every page in the application has the variable, it can be considered
to be an application-level variable, even though it is not an Application scope variable.
The OnRequestEnd.cfm page is used in fewer applications than the Application.cfm page. It lets
you provide common clean-up code that gets processed after all application pages.
For more information on the Application.cfm and OnRequestEnd.cfm pages, see
Application.cfm page" on page
directory structure, see
Note: You can create a ColdFusion application without using Application.cfm or OnRequestEnd.cfm
pages. However, it is much easier to use the Application.cfm page than to have each page in the
application use a
Reusable application elements
ColdFusion provides a variety of reusable elements that you can use to provide commonly-used
functionality and extend CFML. These elements include the following:
•
User-defined functions (UDFs)
•
CFML custom tags
•
ColdFusion components
•
CFX (ColdFusion Extension) tags
•
Pages that you include using the
"Mapping an application" on page
tag that specifies the application name, and contains code that must be processed
272. For information on placing these pages in the application
"Mapping an application" on page
tag and define common application elements.
cfapplication
cfinclude
270.
270.
tag
Elements of a ColdFusion application
"Creating the
269
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