• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

CFC “Good” Practices

Now that you have some understanding of ColdFusion components—how to create and use them, how to extend them with OO concepts, and how to secure them—let's close with a few things that are always good to remember when using CFCs in your applications. Notice the heading for this section doesn't say “Best Practices”—CFCs are going to be used differently by everyone. They are not a strict framework. You may use them as a sort of “next generation” custom tag, or as the foundation of an implementation of an extremely formal OO pattern, or anything in between. Whatever your intent, here are some things that should become habit whenever you use components.

Use Hints

It may seem obvious to you what a particular function does or what the general use is for a component, but it may not be obvious to anyone else! This may be an incorrect attribution, and the quotation marks are mine—but a story goes that T.S. Eliot once gave a lecture toward the end of his life; he opened up the floor to questions. An eager young student began speaking about line four-hundred-something in The Waste Land, where Eliot had written some cryptic phrase; the student asked, “What, exactly, did you mean by that?” Eliot paused and, finally answered, “Young man, when I wrote that line only two people knew what it meant; myself and God. Now…God only knows!”


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint