User Guide

Table Of Contents
276 Chapter 13: Designing and Optimizing a ColdFusion Application
What appears to a user to be a single application (for example, a company’s website), might
consist of multiple ColdFusion MX applications.
ColdFusion MX applications are not J2EE applications. If you do not specify an application
name in your Application.cfc file or
cfapplication tag, however, the Application scope
corresponds to the J2EE application servlet context.
ColdFusion MX applications end when the application has been inactive for the application time-
out period or the server stops. When the application times out, ColdFusion MX releases all
Application scope variables. You must, therefore, select a time-out period that balances the need
for clearing Application scope memory and the overhead of recreating the scope. A typical
application time-out is two days.
ColdFusion MX applications and sessions are independent of each other. For example, if an
application times out while a user’s session is active, the session continues and the session context,
including the user’s Session scope variables, is unaffected by the application ending and restarting.
Although there are no definite rules about how you represent your web application as a
ColdFusion application or applications, the following guidelines are useful:
Application pages share a common general purpose. For example, a web storefront is typically a
single ColdFusion application.
Many, but not necessarily all, pages in a ColdFusion application share data or common code
elements, such as a single login mechanism.
Application pages share a common look and feel, often enforced by using common code
elements, such as the same header and footer pages, and a common error message template.
This chapter describes the tools that ColdFusion MX provides to create an application, and
presents information on how you can develop and optimize your application.
Elements of a ColdFusion application
Before you develop a ColdFusion application, you must determine how to structure the
application and how to handle application-wide needs and issues. In particular, you must consider
all of the following:
The overall application framework
Reusable application elements
Shared variables
Application events and the Application.cfc file
Application-level settings and functions
Application security and user identification
The following sections introduce these application elements and provide references to more
detailed information.