• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Maintaining State > Setting Up the Web Application Framework

7.1. Setting Up the Web Application Framework

The first question you might be asking is "Why do I need an application framework in the first place"? The answer is simple: the Web Application Framework allows you to logically group your CFML templates into a cohesive application or group of applications capable of maintaining state, utilizing constants, handling errors and exceptions, and enforcing security. Sound complicated? It really isn't. As usual, ColdFusion abstracts the high level programming that would normally be required to accomplish all of the tasks I just mentioned by providing two templates that serve as the foundation for the Web Application Framework. These templates, named Application.cfm and OnRequestEnd.cfm, are responsible for setting up and controlling every aspect of the Web Application Framework.

7.1.1. The Application.cfm File

In order to use the Web Application Framework, you have to create a template named Application.cfm, a special filename reserved by ColdFusion for use in the Web Application Framework. The Application.cfm template should be placed in the root directory of your ColdFusion application. Note that the filename is spelled with a capital "A". This is especially important if you are running ColdFusion for Unix or Linux, where filenames are case-sensitive.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint