 |
|
ColdFusion Article |
 |
 |
 |
 |
 |
 |
|
|
|
| 
|
| Note:
With the release of ColdFusion MX
6.1, Macromedia has merged the ColdFusion
MX for J2EE edition with ColdFusion
MX Enterprise. As a result, the features
specific to ColdFusion MX for J2EE
are now available with ColdFusion
MX Enterprise.
I recently evaluated Macromedia ColdFusion
MX for IBM WebSphere, a Java application
server that runs within a J2EE-compliant
infrastructure. ColdFusion MX for
WebSphere compiles CFML files (.cfm
files) into Java classes and then
executes them within the IBM WebSphere
application server and virtual machine.
This functionality allows you to run
your existing ColdFusion application
within the J2EE environment. In my
research, I found that ColdFusion
MX for WebSphere yields several key
opportunities for Java developers.
|
|
|
Evaluation
setup
The platform I tested on consisted of the Microsoft Windows
2000 operating system and Intel x86 architecture. The IBM
WebSphere configuration used the Apache Group's HTTP server
as a web server that handles incoming HTTP requests and static
content. IBM has implemented a native web connector that integrates
with the Apache web server for dispatching requests to the
web container based on user input. As I mentioned earlier,
ColdFusion MX is a Java application - it runs on top of a
J2EE-compliant web container. |
| |
| |
| ColdFusion MX consists
of the file cfusion.ear.
This enterprise archive is based on the J2EE specification
as defined by Sun Microsystems. The file cfusion.ear contains
exactly what you might expect—application.xml
and the servlet 2.3-compliant cfusion.war.
The web archive file cfusion.war contains all of the servlet
definitions, mappings and required Java libraries to run the
ColdFusion MX application. The structure of this application
is just as you would expect with any Java enterprise archive
file. |
| |
Opportunities
for the Java developer
As mentioned previously, ColdFusion MX compiles CFML files
(.cfm files) into Java classes -- making it possible to
run your existing ColdFusion application within the J2EE
environment. This is a benefit provided by the IBM WebSphere
platform that really counters one of the issues that I see
as a limitation with the ColdFusion application server;
the close ties that bind the developer to the Win32 environment. |
| |
A second interesting
benefit of the ColdFusion MX environment resides within
application deployment. As was true in previous versions,
the only step necessary in redeploying a ColdFusion page
is to save the new file to the server. The next time the
file is requested from the server, ColdFusion MX automatically
compiles the new page into bytecode and executes it. This
hot deployment capability saves time, since the recompilation
is handled automatically by the ColdFusion runtime environment.
The execution takes place within the IBM WebSphere Java
virtual machine. |
| |
| In short, this
is a good example of RAD - rapid application development.
With ColdFusion MX, the developer can simply copy the new
CFML file into the appropriate virtual directory and immediately
execute the code. Many times, Java developers find themselves
waiting during the deployment of a Java application while
employing the use of an Ant build script. Ant is a very powerful
development tool. However, when you have a simple presentation
layer change to a JSP page, it can be like using a sledgehammer
to kill a mosquito. If you use ColdFusion MX as opposed to
traditional JSPs and Servlets, there is no need for executing
a conventional Ant build script to compile some code, zip
up a WAR, zip up an EAR, deploy the archive and bounce the
server. It is immediately available and ready to be executed
after being saved. This is a real time saver because you can
streamline the cyclical process of application deployment.
As with any cyclical process, little efficiency gains in the
cycle can produce substantial savings in the long run. This
type of development environment can bring about significant
changes to the daily routines in most Java shops. |
| |
| To compare the
processes for invoking web services in Java versus ColdFusion
MX (through ColdFusion components, or CFCs), I suggest trying
one of the following tutorials on web services: |
| |
|
| |
JDBC versus
ODBC for database interaction
ColdFusion MX no longer relies on ODBC for database interaction.
When using ColdFusion MX and WebSphere, relational data stores
are available through JDBC. This results in two value-added
benefits. First, ODBC drivers can be expensive. Secondly,
ODBC is tightly coupled to the Win32 operating environment.
By using JDBC for relational database connectivity, you gain
cost savings as well as platform independence. |
| |
Direct
interaction with Java Objects
Just like the recent versions of ColdFusion server, ColdFusion
MX allows direct interaction with Java objects such as EJBs
and other standard software components using SOAP and COM.
This is only a cursory look in terms of specific capabilities
of ColdFusion MX, but think about this: If I'm a Java developer
who has built complex applications comprised of Java assets
like EJBs, Servlets, JSP and Java tag libraries, wouldn't
it be great if I could take those assets, and expose them
to a ColdFusion developer? With ColdFusion MX this is possible.
Java developers can focus on transactional aspects of the
application, while empowering ColdFusion developers to participate
in development using the same assets. |
| |
Most Java developers
I know like to focus on transactional aspects of applications,
and don't relish getting involved in the presentation layer.
Most ColdFusion developers I know are great at presentation
of data, but look to Java as a language better suited for
highly transactional applications. Now those two camps can
come together and work side by side on applications, sharing
assets and rapidly building one application.
In summary, ColdFusion MX provides developers with access
to enterprise-level platforms that were previously unavailable
to the predominantly Win32 middleware application. Secondly,
a byproduct of rapid application development is possible
when using ColdFusion MX. Macromedia is moving to produce
a standards-based application environment that is a good
fit for the enterprise market. Considering IBM's enterprise
customer base, success in the enterprise computing market,
and commitment to building quality products, Macromedia
has chosen a strong partner for that type of endeavor. From
the standpoint of a pure Java developer that has some experience
with the Macromedia product lines, I suggest that you try
ColdFusion MX for IBM WebSphere. |
| |
|
| About the author
James
F. Hurff is a Sun Certified Java developer with 7+ years
of web-based software development, systems design and systems
administration. Mr. Hurff is the President and Co-Founder
of Hurff-Webb, Inc., a Jacksonville, Florida-based technology
consulting firm. Hurff-Webb, Inc. specializes in staff augmentation
and onsite support as well as offsite project-based software
development, application hosting and ASP. Hurff-Webb, Inc.
specializes in the Java and J2EE technology set specifically.
For more information on Hurff-Webb, Inc. and their list
of products and services, please visit the official website
at www.hurff-webb.com
or call them at (904) 861-2366. |
| |
|
|
|
|
|
|