O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reusing Code

All developers write—or should write—code with reuse in mind. There are many reasons why this is a good idea:

  • Saving time. If it’s written once, don’t write it again.

  • Easier maintenance. Make a change in one place and any code that uses it gets that change automatically.

  • Easier debugging. Fewer copies exist out there that will need to be fixed.

  • Group development. Developers can share code more easily.

Most of the code reuse in this book involves ColdFusion code, but to demonstrate basic reuse, let’s look at a simple example.

Orange Whip Studios is building a Web site, slowly. Figure 9.11 shows a Home page (still being worked on), and Figure 9.12 shows a Contact page (also being worked on).

Figure 9.11. The Home page contains basic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required