BF on CF
Introducing ColdFusion MX 6.1
Introducing ColdFusion MX 6.1
Aug. 12, 2003 01:56 PM
It's been over a year since Macromedia released the most
important and ambitious ColdFusion ever, ColdFusion MX. Considering
the scope of the undertaking, ColdFusion MX has been an incredible
success.
Reengineering and rewriting a mature product from scratch is
not a task undertaken lightly, but the customer feedback we've
received has affirmed that we did the right thing. The enhancements
in ColdFusion MX have given developers important new capabilities,
and the move to the Java-based architecture has helped us increase
performance and provide developers with exciting new deployment
options.
But as with all ambitious projects, there were things we
couldn't get done and there were things we didn't get quite right the
first time. And that's what brings us to ColdFusion MX 6.1, an
absolutely vital update to ColdFusion MX. It's faster, simpler, and
much more powerful than even ColdFusion MX. And so, for the first
time in printed form, it is my pleasure to introduce you to
ColdFusion MX 6.1.
Simplified Installation and Migration
Installation and migration have proven to be the primary
gotchas for CFMX users. ColdFusion MX 6.1 features a brand new cross
platform installer that:
Provides clear instructions and explains options in detail
Gracefully handles the non-plain-vanilla installations (the
ones that gave CFMX a hard time)
Works out-of-the-box with multihomed systems
Includes an advanced Web server configuration wizard
Provides improved upgrade and migration tools
Continues to support silent installation for those who need it
ColdFusion MX 6.1 also features increased backward
compatibility. Thanks to all the feedback from early adopters of
ColdFusion MX, we were able to identify dozens of areas where we'd
inadvertently broken compatibility. As a result, it should be much
easier to bring forward your ColdFusion 5 and 4.5 applications.
New OS Support
There have been several important operating system upgrades
since ColdFusion MX shipped, and many users have been clamoring for
support for these operating systems. New to CFMX 6.1 are:
Windows Server 2003 (and IIS6)
RedHat Linux 8
RedHat Linux 9
SuSE Linux 8
Solaris 9
AIX 4.3.3 and 5.1
Of course, all currently supported platforms and operating systems
remain supported.
Faster Development
By now just about everyone knows that CFMX is a compiler - it
compiles CFML code to Java bytecode. Actually, that is almost true;
what it actually does is generate Java source code corresponding to
the original CFML, and then compiles that generated Java to bytecode.
I'm not going to explain the benefits of ColdFusion being a
compiler (this has been covered before extensively). What I do want
to point out is what many of you have already discovered: ColdFusion
the compiler improves execution speed at runtime, but it hurts
performance at development time. Why is this? The initial code
generation and compile process is time consuming, and each time you
tweak a CF tag and then try your change, ColdFusion has to go through
that entire process again.
ColdFusion MX 6.1 comes with a brand new compiler, one that
compiles from CFML to Java bytecode directly (without needing to
generate Java source code and spawn another compiler). The result?
Blinding fast execution, so fast that you'll likely not even notice
the difference between the initial compile and subsequent requests.
In fact, the compiler is so fast that you may not want to
bother saving the compiled .class files anymore. CFMX compiles to
disk, the CFMX cfclasses directory contains a .class file for each
.cfm file, and once compiled, ColdFusion accesses those .class files
directly so as to not have to recompile the CFML source again. But in
CFMX 6.1 the compiler is so fast that you'll likely find that there
is no real value in storing the .class files. Instead, ColdFusion can
compile to memory and execute the bytecode directly from there (this
will also solve the problem that some of us ran into where .class
files were left over or went out of synch). Of course, this will mean
that if the server restarts, ColdFusion will need to recompile your
.cfm files, but this process is so fast that it may be worth it
(after all, checking file time stamps and reading .class files from
disk takes time too).
ColdFusion MX 6.1 supports both compiling to disk (CFMX
behavior) and compiling to memory. The ColdFusion Administrator lets
you define how you'd like the compiler to behave.
Faster Runtime
The new compiler has no real impact on runtime, its job is to
improve development time. But ColdFusion MX 6.1 improves runtime
performance too. While exact numbers were not available at press
time, initial testing using example application testing (identical
applications on identical hardware) has shown significant performance
gains even over ColdFusion MX (which was already faster than
ColdFusion 5, which was already faster than... you get the idea).
Improved Protocols
The protocol tags are a very important part of the CFML
language, and ColdFusion MX 6.1 improves and enhances them all. Key
improvements include:
<CFHTTP> now supports all HTTP operations (GET, POST, HEAD,
PUT, DELETE, TRACE, OPTIONS).
<CFHTTP> now provides access to all headers and content, and
provides explicit control over timeouts and proxy support.
<CFPOP> now supports the retrieval of multipart e-mail
messages (those with text and HTML parts contained within a single
message).
<CFINVOKE> now supports secure connections (via https).
<CFINVOKE> now provides control over timeouts and proxy support.
Improved <CFMAIL>
The most used Internet protocol tag has to be <CFMAIL>, and
<CFMAIL> has been dramatically enhanced too. For starters, in
ColdFusion MX 6.1 (Enterprise) it is possible to allocate multiple
mail delivery threads, and also keep SMTP connections open. The
combination of these two features introduces mail delivery throughput
that exceeds anything possible in prior versions of ColdFusion. On
test boxes <CFMAIL> has been clocked delivering over 1,000,000
messages an hour!
<CFMAIL> also now supports SMTP logins (required by many SMTP
servers to prevent mail relaying). The <CFMAIL> attributes USERNAME
and PASSWORD allow for the login information to be provided within
the tag. (It is also possible to provide login information in the
SMTP server definition in CF Admin).
Another frequently requested <CFMAIL> enhancement is support
for multiple SMTP mail servers (so that if one is unavailable an
alternate may be used). This is now supported in ColdFusion MX 6.1
(Enterprise) at both the CF Admin level and the <CFMAIL> level.
In addition, the new <CFMAILPART> tag allows developers to
create multipart messages so that a single message may contain both
HTML and text versions of the message body. The syntax looks like
this:
<CFMAIL ...>
<CFMAIL PARAM ...>
<CFMAILPART type="text">
Text version goes here
</CFMAILPART>
<CFMAILPART type="html">
<B>HTML version goes here</B>
</CFMAILPART>
</CFMAIL>
Improved CFCs
ColdFusion Components (covered in detail in CFDJ, Volume 4,
issues 6 and 7) are the most important CFML language enhancement in
ColdFusion MX. ColdFusion MX 6.1 fixes several issues with CFCs, and
adds the single most requested enhancement:
Within a CFC it is now possible to use the "super" scope to
access overridden methods.
CFCs can now safely be placed in a variety of scopes, and CFC
code has access to all scopes.
Other Bits and Pieces
There are also all sorts of other little goodies. For example:
A new Wrap() function which inserts breaks into text to force
wrapping (used internally by the new <CFMAIL> WRAP attribute)
Lots of COM improvements, and the introduction of a
ReleaseCOMObject() function (which does exactly what its name
suggests)
Improved <CFCHART> performance
An update to the Flash Remoting engine
The embedded AXIS engine has been updated to v1.1 (this
provides numerous SOAP enhancements including better interaction with
.NET Web services)
Versioning Changes
Even if none of what I have mentioned thus far makes you sit
up and take notice, this next one will.
With ColdFusion MX 6.1 we've changed the product editioning.
ColdFusion Professional has been replaced by ColdFusion Standard, and
ColdFusion Enterprise is now a combination of ColdFusion Enterprise
and ColdFusion for J2EE (and we've even included a full version of
JRun as well). What does this mean to you? As a ColdFusion Enterprise
user you now have several different ways to install ColdFusion MX:
As a standalone: Like in CFMX (using the embedded JRun).
On top of JRun: You get a full JRun installation, and the
ability to run multiple CF instances on top if it. This translates
into better performance, greater security, superior scalability, and
more control over specific applications (as explained in last month's
column, CFDJ, Volume 5, issue 7).
On top of a J2EE server of your choice: For example, IBM
WebSphere, BEA WebLogic, and Sun ONE.
In other words, you are getting CFMX, CFMX for J2EE, and JRun 4 - all
for the same price and the same upgrade.
Summary
ColdFusion MX 6.1 is an important upgrade to an important
product. If you are already using ColdFusion MX then 6.1 is free, and
you'll enjoy greater performance and stability than ever before. And
if you are not yet using ColdFusion MX, well, there couldn't be a
better time to jump on board.
About Ben FortaBen Forta is Adobe's Senior Technical Evangelist. In that capacity he spends a considerable amount of time talking and writing about Adobe products (with an emphasis on ColdFusion and Flex), and providing feedback to help shape the future direction of the products. By the way, if you are not yet a ColdFusion user, you should be. It is an incredible product, and is truly deserving of all the praise it has been receiving. In a prior life he was a ColdFusion customer (he wrote one of the first large high visibility web sites using the product) and was so impressed he ended up working for the company that created it (Allaire). Ben is also the author of books on ColdFusion, SQL, Windows 2000, JSP, WAP, Regular Expressions, and more. Before joining Adobe (well, Allaire actually, and then Macromedia and Allaire merged, and then Adobe bought Macromedia) he helped found a company called Car.com which provides automotive services (buy a car, sell a car, etc) over the Web. Car.com (including Stoneage) is one of the largest automotive web sites out there, was written entirely in ColdFusion, and is now owned by Auto-By-Tel.