
Mapping an Application Framework
217
Defining the directory structure
Defining a root directory for an application has a number of advantages:
•
Development
The application is easier to develop and maintain because the
application page files are well organized.
•
Portability
You can more easily move the application to another server or
another part of a server without changing any code in the application page files.
•
Application-level settings
Application pages that fall under the same root
directory can share application-level settings and functions.
•
Security
Application pages that fall under the same directory can share Web
server security settings.
You can use a single Application.cfm file for your application, or use different
Application.cfm files that govern individual sections of the application.
The following directory trees illustrate two approaches to implementing the
Application Framework:
•
In the first example, a company named Web Wonders, Inc. uses a single
Application.cfm file installed in their application root directory to process all
application page requests.
•
The example on the right shows how Bandwidth Associates uses the settings in
individual Application.cfm files to specify processing for ColdFusion applications
at the departmental level. Only the Products application pages are processed
using the settings in the root Application.cfm file. The Consulting, Marketing,
and Sales directories have their own Application.cfm file.
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...