
253
DEVELOPING
COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Las
t
upda
te
d 8/5/2010
Naming the application
Use the
cfapplication
tag to specify the application name and define a set of pages as part of the same logical
application. Although you can create an application by placing a
cfapplication
tag with the application name on
each page, you normally place the tag in the Application.cfm file; for example:
<cfapplication name="SearchApp">
Note:
The value that you set for the
name
attribute in the
cfapplication
tag is limited to 64 characters.
Setting the client, application, and session variables options
Use the
cfapplication
tag to specify client state and persistent variable use, as follows:
•
To use Client scope variables, specify
clientManagement=True.
•
To use Session scope variables, specify
sessionManagment=True
.
You can also optionally do the following:
•
Set application-specific time-outs for Application and Session scope variables. These settings override the default
values set in the ColdFusion Administrator.
•
Specify a storage method for Client scope variables. This setting overrides the method set in the ColdFusion
Administrator.
•
Specify not to use cookies on the client browser.
For more information on configuring these options, see “
Using Persistent Data and Locking
” on page 301 and the
CFML Reference
.
Defining page processing settings
The
cfsetting
tag lets you specify page processing attributes that you want to apply to all pages in your application.
For more information, see “
Setting page processing options
” on page 242.
Setting application default variables and constants
Set default variables and application-level constants on the Application.cfm page. For example, specify the following
values:
•
A data source
•
A domain name
•
Style settings, such as fonts or colors
•
Other important application-level variables
Often, an Application.cfm page uses one or more
cfinclude
tags to include libraries of commonly used code, such as
user-defined functions, that are required on many of the application’s pages.
Processing logins
When an application requires a user to log in, you typically place the
cflogin
tag on the Application.cfm page. For
detailed information on security and creating logins, including an Application.cfm page that manages user logins, see
“
Securing Applications
” on page 339
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...