Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started
by Ben Forta, Raymond Camden, Charlie Arehart
Unit Testing
One important benefit of ColdFusion Components not mentioned thus far is testing. As you build applications you’ll want to test your work regularly. And the larger and more complex an application becomes, the harder testing becomes. This is even more problematic when code gets in the way. For example, if you were testing the SQL in a <cfquery> you wouldn’t want HTML layout issues to unnecessarily complicate the testing.
Breaking code into tiers greatly simplifies testing. Once you’ve written your ColdFusion Component you can (and should) create a simple test page, one that doesn’t have complex display code and simply invokes methods and dumps their output—much like we did in the geometry example earlier in this chapter. Experienced ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access