Using CFX


The CFX interface was the original ColdFusion extensibility interface (it was introduced in ColdFusion 2). It is fast and powerful, and allows for tags to be written in Java or in C/C++. That's the good news.

The bad news is that CFX tags are limitedthey have access to only a few ColdFusion data types (essentially whatever existed back in ColdFusion 2 days).

CFX tags are executables that must be registered in the ColdFusion Administrator so as to bind an alias with the name of the actual executable. Using the CFX interface, it is possible to write extensions that cannot be written using other interfaces.

For example, the following code snippet uses a C++ CFX named <cfx_zip> to unzip a ZIP file and save the contents into a specified directory:

 <!--- Unzip C:\FILES\FIGURES.ZIP into C:\SALES ---> <cfx_zip action="UNZIP"          destination="C:\SALES"          zipfile="C:\FILES\FIGURES.ZIP"> 

ColdFusion comes with headers and includes files and sample code that should be used when creating CFX tags.



Macromedia ColdFusion MX 7 Certified Developer Study Guide
Macromedia ColdFusion MX 7 Certified Developer Study Guide
ISBN: 0321330110
EAN: 2147483647
Year: 2004
Pages: 389
Authors: Ben Forta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net