Learncfinaweek 1 5

Page 132

What is an Application?

ColdFusion applications differ from traditional desktop applications in that they are not always "running" when enabled. CF Applications only ever do anything when an http request is made; with the exception of special cases like onApplicationStop and onSessionStop. When a request is made during the execution of the Application.cfc implicit constructor code, the applicable application name is determined, and the applicable memory scopes for that application are associated with the request. Then, any necessary events are broadcast and responded to, in serial (onSessionStart will not fire before onApplicationStart returns; onRequestStart waits for onSessionStart, and so on...). Control is then passed to the requested template. After the template completes, control shifts back to Application.cfc where onRequestEnd, if defined, will be executed.

Learn CF in a Week - Week 1 - Application.cfc

Page 124


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.