Macromedia Coldfusion MX 7 Web Application Construction Kit
Throughout this book, you have been learning how to use CFML's built-in tags and functions to produce dynamic Web pages. You have used tags like <cfquery> and <cfoutput> to display information stored in databases, and you have used functions like uCase() and dateFormat() to further tweak your work. For the next few chapters, you will be exploring how to extend the CFML language by creating your own tags, functions, and components. Once you see how easy it is to do so, you will find that you can make your application code much more elegant and maintainable. It's a very exciting topic. It's even fun. There are four basic ways in which you can extend ColdFusion:
NOTE If you wish, you can also extend ColdFusion MX by writing JSP tag libraries, COM/ActiveX controls, Java classes or JavaBeans, and more. The list above simply summarizes the extensibility methods specific to ColdFusion.
In this chapter, I will concentrate on the first option, user-defined functions. I recommend that you also read Chapter 23 so you know the extensibility options available to you. In many cases, you can get a particular task done by creating a tag or a function, so it helps to have an understanding of both. |