Trying It Yourself

Codegen is OK for some tasks (and is wonderful for rapid prototyping), but more often than not it won’t be enough. This is why most of this book discusses coding. To give you a taste of what’s to come, try this small (and very simple) application. I won’t go into the details of the code itself; for now, concentrate on creating and executing CFM files so they work. If you can get all these to function, you’ll have a much easier time working through the book.

The bday application is really simple; it prompts you for your name and date of birth and calculates your age, using simple date arithmetic. The application is made up of two files:

  • bday1.cfm (shown in Listing 4.1) is the form that prompts for the name and date of birth. ...

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.