Wednesday, March 14, 2007

An Epiphany: Application.cfc

While working on a project at work, I dumped the Application scope to see what was in it. Then, on a lark, I dumped the This scope to see what would happen. To my surprise, it dumped Application.cfc! Then it occurred to me—Application.cfc really represents the entire application. You never leave its scope; you can always access its methods and members. In essence, each page you access is "inside" Application.cfc. Or, in other words, every page in an application is encapsulated within Application.cfc.

I liked Application.cfc and its power and elegance before, but I love them even more now.