User Guide

Table Of Contents
259
CHAPTER 12
Building Custom CFXAPI Tags
Sometimes, the best approach to application development is to develop elements of your
application by building executables to run with Macromedia ColdFusion. Perhaps the application
requirements go beyond what is currently feasible in CFML. Perhaps you can improve application
performance for certain types of processing. Or, you have existing code that already solves an
application problem and you want to incorporate it into your ColdFusion application.
To meet these types of requirements, you can use the ColdFusion Extension Application
Programming Interface (CFX API) to develop custom ColdFusion tags. This chapter documents
custom tag development using Java or C++.
Contents
What are CFX tags? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Before you begin developing CFX tags in Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Writing a Java CFX tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
ZipBrowser example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Approaches to debugging Java CFX tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Developing CFX tags in C++. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
What are CFX tags?
ColdFusion Extension (CFX) tags are custom tags written against the ColdFusion Extension
Application Programming Interface. Generally, you create a CFX tag if you want to do something
that is not possible in CFML, or if you want to improve the performance of a repetitive task.
One common use of CFX tags is to incorporate existing application functionality into a
ColdFusion application. That means if you already have the code available, CFX tags make it easy
to use it in your application.
CFX tags can do the following:
Handle any number of custom attributes.
Use and manipulate ColdFusion queries for custom formatting.