What Are Application Variables?

Pretend it’s Oscar season. Orange Whip Studios feels that all of its films are contenders. Tensions are high, and the president wants a new “Featured Movie” box on the studio’s home page to help create more “buzz” than its bitter rival, Miramax. The featured movie should be different each time the home page is viewed, shamelessly rotating through all of the studio’s movies. It’s your job to get this project done, pronto.

Hmmm. You could retrieve all the movies from the database for each page request and somehow pick one at random, but that wouldn’t guarantee that the same movie wouldn’t get picked three or four times in a row. What you want is some way to remember your current spot in the list of movies, so they ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.