A ColdFusion application is a collection of application pages that work together. Applications can be as simple as a guest book or as sophisticated as a full Internet commerce system with catalog pages, shopping carts, and reporting. You can combine individual applications to create advanced Web systems.
The ColdFusion Web Application Framework is based on four basic components:
With these components, you can easily combine your ColdFusion application pages to create sophisticated Web applications.
ColdFusion provides application-level facilities that help you control settings, variables, and features available across the entire application. After you define an application, you can use the application-level features in addition to all of the other features in ColdFusion.
You specify application-level settings in the Application.cfm and OnRequestEnd.cfm files. Application.cfm is executed when ColdFusion starts processing each page in your application, and OnRequestEnd.cfm is processed after all other processing is completed for the page.
ColdFusion provides four variable scopes that let you to maintain data that must last beyond the scope of the current page.
ColdFusion does not attempt to automatically evaluate Application, Session, or Server variables. You must use variable prefixes with these variables, as in Session.variablename or Application.variablename. As a general rule you should prefix all these variables with their scope identifier.
ColdFusion provides locking functions to manage access to Session, Application, and Server variables. Because these variables are kept in your server's memory, you must lock them when you use them to prevent errors that arise from simultaneous access.
Caution Understanding lock management and using locks effectively is vital to correctly using Session, Application, and Server scope variables. For more information on locking, see "Locking Code with cflock". |
You can use the cferror
tag to display customized HTML pages when errors occur in your application. This allows you to maintain a consistent look and feel within your application even when errors occur. It also allows you to optionally suppress the display of error information.
For more information, see "Generating Custom Error Messages with cferror".
You can integrate your applications with the user authentication and security provided by your Web server. In addition, the ColdFusion Server offers a security framework that controls access to applications, pages, data sources, and users. You set the bounds of a security domain using the cfauthenticate
tag.
For more information, see Chapter 19, "Application Security".