Chapter19.Introducing the Web Application Framework


Chapter 19. Introducing the Web Application Framework

IN THIS CHAPTER

Using Application.cfc 528

Using Application Variables 534

Customizing the Look of Error Messages 542

Using Locks to Protect Against Race Conditions 553

Application Variable Timeouts 565

ColdFusion provides a small but very important set of features for building sophisticated Web applications. The features have to do with making all your ColdFusion templates for a particular site or project behave as if they were related to one anotherthat is, to make them behave as a single application. These features are referred to collectively as the Web application framework.

The Web application framework is designed to help you with the following:

  • Consistent Look and Feel. The application framework enables you to easily include a consistent header or footer at the top and bottom of every page in your application. It also lets you apply the same look and feel to user error messages. You can also use it to keep things like fonts and headings consistent from page to page.

  • Sharing Variables Between Pages. So far, the variables you have worked with in this book all "die" when each page request has been processed. The Web application framework gives you a variety of ways to maintain the values of variables between page requests. The variables can be maintained on a per-user, per-session, or application-wide basis.

  • Before and After Processing. The application framework gives you an easy way to execute custom code you want just before each page request. A common use for this capability is to provide password security for your application. You can also execute custom code just after the request. Along with executing code before and after a request, you can execute code when the application starts and when it expires. This lets you specify application-wide variables when it starts up, and doing cleanup once the application expires.

Considered together, it's the Web application framework that really lets you present a Web experience to your users. Without these features, your individual templates would always stand on their own, acting as little mini-programs. The framework is the force that binds your templates together.



Macromedia Coldfusion MX 7 Web Application Construction Kit
Macromedia Coldfusion MX 7 Web Application Construction Kit
ISBN: 321223675
EAN: N/A
Year: 2006
Pages: 282

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net