JT400 4.1 Released/Back from Vacation

After a nice long week off, I'm back from vacation. Man, I can't wait for retirement ;-) Of more important note is the release of JTOpen 4.1 by IBM (an open source JDBC driver for iSeries [AS400] DB2). This is basically a maintenance release that fixes all sorts of minor issues, as well as adds some enhancements to the driver. You can download it from IBM. I've already installed it on two machines, and it's been working for a few hours on a rather large application with no apparent issues.

On Vacation/Away from Blogging

I'll be on vacation all next week, so chances are I won't be blogging much. I've got a lot to say about the MX 6.1 release when I get back, so stay tuned.

On a related note, my new O'Reilly book, Programming ColdFusion MX should be on store shelves next Wednesday (8/13). I'll try to blog an entry from the road, but if not, I'll have a lot to say about it when I return.

CF MX 6.1 Adds Millisecond Support to Time Functions

One often requested enhancement to ColdFusion has been the addition of milliseconds to ColdFusion's various date/time functions. In MX 6.1, Macromedia has finally added support via a new mask element, "l" (that's a lowercae L). This new mask can be used with the following functions:


Wrapping with Wrap() in CF MX 6.1

I saw a question on the CF-Talk list asking about the new wrap() function in CF MX 6.1. It's not as intuitive a function as you would think. The first time I saw it, I assumed you passed it a string and a character break, and it would return a string formatted with <BR> tags at the appropriate interval. This is not what it does. Here's an explanation from my new book, Programming ColdFusion MX:

Usage: wrap(string, limit [,strip])

Specifies the maximum number of characters to allow per line in string. If a line is longer than the specified number of characters, an attempt is made to break the line by inserting a line break at the nearest whitespace character (space, tab, etc) before the character limit. If string contains no whitespace characters before the maximum number of characters per line, a line break is inserted at the maximum line length. Wrap() uses operating system specific line breaks. On Windows, it's a carriage return and newline character. On Unix/Linux, it's a newline. Optionally, you can specify a third Boolean argument to indicate whether to remove all existing carriage line breaks before wrapping the string. The default for this argument is false.

<cfset myString="This is a string that is so long, I probably would like to break it up. What do you think about that? Is it a good idea?">

<pre>#wrap(myString, 80, False)#</pre>

If you need a function that actually inserts <BR> tags for you, consider wrap() from the CFLib.org web site. Note that you'll have to rename the UDF to avoid conflicting with the new wrap() function in 6.1.

Short CNet News.com Piece on the Upcoming Flash 7 Player

CNet's News.com has a short piece on the upcoming Flash 7 player. Of particular interest is this quote:

"The new version of the Flash Player, available for download from Macromedia, concentrates on performance improvements that allow the software to process some types of Flash content as much as 10 times faster, said Lucian Beebe, Macromedia's product manager for Flash."

I've been using the beta for a week or so now, and I've noticed that it does seem to run Flash Remoting apps a bit quicker, although I don't have any real comparison numbers.

GetTickCount() in ColdFusion MX 6.1

In a blog post earlier today, Ben Forta mentions that getTickCount() returns a different value than in previous versions of ColdFusion.

With the MX 6.1 release, getTickCount() now returns the number of milliseconds from Unix Epoch (January 1, 1970, 00:00 GMT). Note that it doesn't account for your GMT offset.

OT: California Travel Suggestions?

I haven't done many off-topic posts on my blog (yet), but I figured with the number of people I know that live in California, I could tap into your collective knowledge for some suggestions.

My 5th anniversary is coming up on Aug 15th, and to celebrate, my wife Persephone and I are flying out to LA, renting a convertible and making our way up the coast to Napa/Sonoma for a day or so, and finishing up with three nights in San Francisco. What I'm looking for are some ideas on what to do in between. We're planning on making stops at the Getty Museum and the Hearst Castle, but are interested in suggestions on what sea-side towns might be worth stopping at on our way up the coast, as well as recommendations on where to stay.

Global Component Inheritance with component.cfc

Here's another interesting new feature in ColdFusion MX 6.1...

There may be cases where it would be useful to have one or more methods available to all of the components on your server. Ideas that come to mind are debugging methods, server-wide settings, etc. As of ColdFusion MX 6.1, you can modify a special component called component.cfc that all components on the server automatically extend. Out of the box, the component.cfc file can be found in the \WEB-INFcftags directory and is completely empty. Any methods or properties you place in the file are automatically available to every CFC on your server.

CFCs: Variables/Unnamed Scope Issue Fixed in MX 6.1

For those of you working with CFCs in ColdFusion MX 6.0, you'll be happy to know that the bug affecting variables scope has been fixed in MX 6.1. Now, both the variables scope, and the unnamed scope (unscoped variables) behave the same way. Here's a breakdown of how the variables/unnamed scope, the local scope (var keyword) and the this scope differ:

Variables/Unnamed Scope
Variables in the variables scope are available only within the CFC. They are available to the constructor code, and to all component methods and any pages they include. They may be prefixed with the variables prefix or left unscoped (often called the unnamed scope). Variables in the variables scope that are set within the calling page are not automatically available within the component’s variables scope. Additionally, variables in the variables scope exist as long as the component object exists. This allows them to persist between method calls.

Local Scope
This differs from variables you set in the "local" scope of a method by using the var keyword. These variables are available only to the method in which they are defined and any pages included by that method. Additionally, local variables do not last beyond the life of the method call. The local variable scope differs from other variable scopes in that there is no scope prefix used for the variable. Note that if you do not define the variable with the var keyword, the variable exists in the variables scope, not the local scope.

This Scope
The this scope is functionally equivalent to the this scope in JavaScript and ActionScript. Variables in the this scope are available to all methods within a CFC, any pages they include, and the page that calls the CFC. Within a CFC you refer to variables in the this scope using the this prefix: this.varName. Outside the CFC, you use the component name to reference variables in the this scope: myComponent.varName. Note that this applies only when the CFC is instantiated as an object via the cfobject tag or createObject( ) function, not when a component method is invoked using the cfinvoke tag, without the CFC being instantiated separately.

I hope this helps put things in perspective!

ColdFusion MX 6.1 (Red Sky) is Here!

The long awaited ColdFusion MX 6.1 (formerly Red Sky) is now available for download. I though t it wasn't going to be out for a while longer, but it looks like it's been added to the Macromedia web site (although no mention on the homepage yet).

CF MX 6.1 is so much more than just a maintenance update for ColdFusion. In addition to the over 400 bug fixes in this release, you should (in most cases) notice a huge boost in the speed and stability of the application server thanks to major improvements and tuning undertaken by Macromedia's engineering staff.

Here are the highlights of the new release:

  • App code is now compiled in memory as opposed to disk, resulting in a significant decrease in initial page compilation time as well as an increase in overall runtime performance.
  • The installer was completely overhauled, making it easier than ever to install ColdFusion MX. Additionally, a single installer now covers all versions of ColdFusion.
  • Speaking of versions, Macromedia decided to change the way ColdFusion MX is licensed. I won't go into all of the details here, but I will say that the coolest part is that the Enterprise version now lets you install a FULL copy of JRun and then deploy CF MX 6.1 on top of it. Yep, that's right, a FULL, LICENSED copy of JRun. This means that Enterprise customers can start taking advantage of ome of the more compelling features that J2EE has to offer such as multiple server instances, JRun's buddy list clustering, etc.
  • ColdFusion MX is now deployable on additional operating systems including Red Hat 8 and 9, SuSE 8, Solaris 9, and Windows 2003 Advanced Server. Additionally, deployment is possible on Mac OS X and AIX.
  • COM support was vastly improved with a new version of the JIntegra COM/Java bridge (1.5.3).
  • A new version of Apache Axis (1.1) is including, fixing several web services issues, adding support for SSL, proxies, and timeouts, and improving overall performance.
  • DataDirect JDBC driver were updated to 3.2 SP 1.
  • DataDirect SequeLink 5.3 ODBC Agent and Server.
  • Unicode is now supported in MS Access.
  • Updated Sun JVM (1.4.2).
  • Flash remoting updated to Updater 1 level.
  • Underlying JRun 4 updated to Updater 2 level.
  • cfchart engine updated.
  • Email engine has been totally overhauled. In addition to huge performance improvements (ability to send 1 million + emails an hour in Enterprise), several new features were added including connection pooling, multi-threaded message sending, backup mail servers, support for multi-part messages, SMTP authentication, and fail-to support.
  • CFC's get several major bug fixes and new features. The biggest improvements are the fix to the unnamed/variables scope (more on this later), the addition of a new super "scope" for referencing overriden methods and properties in a parent CFC, a fix for the dreaded page context bug, and the ability to set "global" methods for all CFCs on your server.
  • ColdFusion's built-in security mechanism has been updated to give you the option to tie cflogin's timeout to the session scope.
  • New releaseComObject() function for forcibly terminating a COM object connection.
  • New wrap() function for automatically wrapping text.
  • timeFormat(), lsTimeFormat(), dateAdd(), and datePart() now support milliseconds with a new mask (l).
  • getTickCount() now returns a counter representing the elapsed time in milliseconds from Unix Epoch (January 1, 1970, 00:00 GMT).
  • cfapplication tag now supports new loginstorage attribute, allowing logins to be tied to session scope or a cookie.
  • new xaxistype and yaxistype attributes added to cfchart tag.
  • cfdump tag has been updated to allow you to dump COM objects.
  • cfexecute has a new attribute called variable that you can use to specify a variable name to hold any output generated by the call. Previously, output could only be written to a file.
  • cfhttp was completely rewritten and now supports all HTTP 1.1 operations (get, post, head, delete, put, options, and trace). Additionally, cfhttp gets several new attributes: getAsBinary, multipart, proxyuser and proxypassword. Additionally, there are several new return variables available.
  • Two new attributes for the cfhttpparam tag: encoded and mimetype. Also, two new values for the type attribute in the cfhttpparam tag: body and header.
  • cfinvoke tag gets a few new attributes: proxyserver, proxyport, proxyuser, proxypassword, and timeout.
  • cflogin tag now supports HTTP Digest and NTLM authentication.
  • cfmail tag bonanza! New attributes include charset, failto, replyto, username, password, and wraptext. Additionally, you can now specify multiple servers (to act as backup servers) in the server attribute in the Enterprise edition. Also, type attribute was expanded to allow additional mime types to be specified.
  • cfmailparam tag upated to allow additional mime types in the new type attribute.
  • cfmailpart tag added to allow for multi-part mail messages.
  • cfpop can now retrieve multi-part mail messages.
  • MUCH, MUCH more!

Here's the best part about this release. If you have an existing ColdFusion MX license, the upgrade is completely free! I've been running it in a test environment for quite some time now, and I can say without any hesitation that this is the best, most stable release of ColdFusion ever!

In the self-promotions department, my new book, Programming ColdFusion MX (2nd Ed.) is set to ship on August 13th. O'Reilly specifically decided to hold publication to allow me to update it for MX 6.1. As far as I know, it's the only book on the market that covers all of the changes (and there are a ton) introduced in ColdFusion MX 6.1. I'll be posting more about the book in a few days.