Accessibility

ColdFusion Article

Ben Forta

Ben Forta

www.forta.com

Introducing ColdFusion MX 6.1: Making the Groundbreaking ColdFusion MX Simpler, More Reliable, and a Whole Lot Faster

Note: Macromedia ColdFusion MX 6.1 is now available for trial and purchase.


It's been over a year since we released the most important and ambitious ColdFusion ever, ColdFusion MX. Considering the scope of undertaking, ColdFusion MX has been an incredible success. Re-engineering 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 do and there were things we didn't quite get 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 ColdFusion MX users. ColdFusion MX 6.1 features a brand new cross-platform installer that:

  • Provides clear instructions and explains options in detail
  • Gracefully handles nonstandard installations (the non–plain-vanilla ones that gave ColdFusion MX a hard time)
  • Works out-of-the-box with multihomed systems
  • Includes an advanced web server configuration wizard
  • Provides improved upgrade and migration tools
  • Ensures far greater backward compatibility than ever before
  • Continues to support silent installation for those that need it

Thanks to all the feedback from early adopters of ColdFusion MX, we were able to identify dozens of areas where we had inadvertently broken backward compatibility. As a result, it should be much easier to upgrade your ColdFusion 5 and 4.5 applications.

New Operating System (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 ColdFusion MX 6.1 are:

  • Windows Server 2003 (and IIS 6)
  • RedHat Linux 8
  • RedHat Linux 9
  • SuSE Linux 8
  • Solaris 9
  • AIX 4.3.3 and 5.1

Faster Development

By now, just about everyone knows that ColdFusion MX is a compiler—it compiles CFML code to Java bytecode. Actually, that is almost true; what ColdFusion MX actually does is generate Java source code corresponding to the original CFML, then it compiles that Java it generated to bytecode.

I'm not going to explain the benefits of ColdFusion being a compiler since others have already covered this topic 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 ColdFusion tag and then execute or browse 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 generating Java source code and spawning another compiler first. 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. When ColdFusion MX compiles to disk, the ColdFusion MX cfclasses directory contains a .class file for each CFML file. Once compiled, ColdFusion accesses the .class files directly so that it does not have to recompile the CFML source again. But in ColdFusion MX 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 also solves the problem that some of you ran into, where leftover .class files became out of synch. Of course, this means that if the server restarts, ColdFusion needs to recompile your CFML 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, which is a ColdFusion MX 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. At the time that this article went to press, initial testing with identical example applications on identical hardware revealed significant performance gains over ColdFusion MX, which was already faster than ColdFusion 5, which was already faster than…you get the idea. ColdFusion MX 6.1 is 172% faster than ColdFusion 5 and 160% faster than ColdFusion MX. Read more about how the ColdFusion team improved runtime performance in Performance Under the Covers in ColdFusion MX 6.1 by Jim Schley of our quality assurance team.

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:

  • The CFHTTP tag now supports all HTTP operations (GET, POST, HEAD, PUT, DELETE, TRACE, OPTIONS).
  • The CFHTTP tag now provides access to all headers and content, and provides explicit control over timeouts and proxy support.
  • The CFPOP tag now supports the retrieval of multipart e-mail messages (those with text and HTML parts contained within a single message).
  • The CFINVOKE tag now supports secure connections (through the HTTPS protocol).
  • The CFINVOKE tag now provides control over timeouts and proxy support.

Improved CFMAIL Tag

The most popular Internet protocol tag must be the CFMAIL tag, and Macromedia has dramatically enhanced it, 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, the CFMAIL tag has been clocking delivery of over 1,000,000 messages an hour!

The CFMAIL tag now also supports SMTP logins, which many SMTP servers require to prevent mail relaying. You can use the new CFMAIL tag attributes, USERNAME and PASSWORD to include the login information within the tag. You can also specify login information in the SMTP server definition in the ColdFusion Administrator.

Developers also frequently requested that Macromedia enhance the CFMAIL tag to support multiple SMTP mail servers so that if one is unavailable an alternate may be used. ColdFusion MX 6.1 Enterprise now supports this at both the ColdFusion Administrator level and at the CFMAIL tag level.

In addition, developers can use the new CFMAILPART tag 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>
To read more about CFMAIL tag improvements, read John Cummings' article, Making the Most of E-Mail with the cfmail Tag Enhancements in ColdFusion MX 6.1 and watch and listen to my Macromedia Breeze presentation, Introducing a Better <cfmail>.

Improved CFCs

ColdFusion components are the most important CFML language enhancement in ColdFusion MX. See my articles in the ColdFusion Development Center CFC area for more information. ColdFusion MX 6.1 fixes several issues with CFCs and adds the two most requested enhancements:

  • Within a CFC, you can now use the "super" scope to access overridden methods.
  • You can safely put CFCs 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 you can use to insert breaks into text to force wrapping—used internally by the new CFMAIL tag when you use the WRAP attribute
  • Lots of COM improvements and the introduction of a ReleaseCOMObject() function, which does exactly what its name suggests
  • Improved CFCHART tag performance
  • An update to the Macromedia Flash Remoting engine
  • An update to the embedded AXIS engine to v1.1, providing 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 will.

With ColdFusion MX 6.1 we've changed the product editions. We replaced ColdFusion Professional with ColdFusion Standard, and ColdFusion Enterprise is now a combination of ColdFusion Enterprise and ColdFusion for J2EE. 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:

  • Server configuration: ColdFusion MX using the embedded JRun.
  • J2EE configuration 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. Read more about this in Introducing Multiple Server Instances in ColdFusion MX 6.1, an article from Tim Buntel.
  • J2EE configuration on top of a J2EE server of your choice: For example, you could use IBM WebSphere, BEA WebLogic, or Sun ONE.

In other words, you are getting ColdFusion MX, ColdFusion MX for J2EE, and JRun 4—all for the same price and the same upgrade.

ColdFusion MX 6.1 is an important upgrade to an important product. If you are already using ColdFusion MX, upgrading to ColdFusion MX 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 the author

Ben Forta is the Macromedia senior product evangelist and the author of numerous books, including ColdFusion Web Application Construction Kit and its sequel Advanced ColdFusion Application Development, as well as books on SQL, JavaServer Pages, WAP, Windows development, and more. Ben co-authored the official Macromedia ColdFusion training material, the certification tests and Macromedia Press study guides for those tests, now spends a considerable amount of time lecturing, speaking, and writing about application development worldwide.

 

Submit feedback on our tutorials, articles, and sample applications.