Understanding Structured Development
The best way to understand structured development—what it does and the problems it solves—is to look at an example. Listing 11.1 should be familiar; it’s the first data-driven example we looked at in Chapter 10, “Creating Data-Driven Pages.”
Listing 11.1. movies1.cfm—The Basic Movie List
<!--- Name: movies1.cfm Author: Ben Forta (ben@forta.com) Description: First data-driven Web page Created: 07/01/07 ---> <!--- Get movie list from database ---> <cfquery name="movies" datasource="ows"> SELECT MovieTitle FROM Films ORDER BY MovieTitle </cfquery> <!--- Create HTML page ---> <html> <head> <title>Orange Whip Studios - Movie List</title> </head> <body> <h1>Movie List</h1> <!--- Display movie list ---> <cfoutput ... |
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.