Archive for March, 2003

DevNet Center Update and New RSS Feed

Macromedia has just published new DevNet Center content which relates to all the announcements at Flashforward 2003:

First of all, DevNet Center content is now available through an RSS feed in addition to the old Macromedia XML format. The old format is deprecated, so if you are using it, make a note to switch over to new the RSS version. We will continue to publish both for a while, but eventually we will standardize on RSS. You can read more here:

The Macromedia Central Development Center (Beta) has launched. If you are interested in Central or in possibly joining the beta, have a look:

What is Flash Central:

Macromedia Central White Paper (Kevin Lynch):

JD’s Forum: Macromedia Central (John Dowdell):

Here’s Mike Chamber’s perspective on Flashforward 2003:

Information on the new Flash 6 player for PocketPC:

Macromedia Flash Player 6 Pocket PC 2002 Developer Kit:

Macromedia Flash Integration with Pocket PC E-mail and Contact List:

Exploring Macromedia Flash Communication Server MX 1.5:

Using cflogin with Flash Remoting

I did a session on Flash Remoting with ColdFusion at Flashforward here in San Francisco, and I got a pretty good question from someone in the audience. He wanted to know how to use ColdFusion’s built-in authentication mechanism with ColdFusion components and Flash Remoting. Fortunately, ColdFusion and Flash make it very easy.

First of all, CFC functions have an optional “roles” attribute which you can use to limit access to that specific function. So the first thing you do is specify a coma-delimited list of roles which are valid for your function. The example function I wrote is below:

<cffunction name="getDate"
<cfreturn #now()# />

The next thing you do is use the setCredentials function on a NetConnection instance in ActionScript. Example code below:

var gw = "http://localhost/flashservices/gateway";
var con = NetServices.createGatewayConnection(gw);
// username and password are text fields...
con.setCredentials(username.text, password.text);
var serv = con.getService("com.macromedia.tests.auth_test", this);

The last thing you have to do is map your username and your password to one or more roles, which you do using cflogin and cfloginuser. I put the following code in an example Application.cfm file:

<cfapplication name="authTest" />
<cfif isDefined("cflogin")>
<cfif eq "someUsername" and
cflogin.password eq "somePassword">
<cfloginuser name=""
roles="admin" />

That’s all you have to do.

Live – Flashforward 2003 Keynote

Central lets you download and install Flash applications that you can run locally with or without an Internet connection. Very cool, very new, very different. Check out the details here:

Flash Player 6 for Pocket PC
What more needs to be said? It’s available now right here:

Flash Communication Server
New version available today. New features include:

  • Secure Connections
  • Linux Support
  • Free Developer Edition

DevNet Resource Kit
Mike Chambers did a sneak peek of a couple of apps that will be available on DRK Volume 3. The first one is RSSify which lets you produce RSS feeds on a server (Flash and ColdFusion). The second one is called News Aggregator, which is a Flash client that consumes RSS feeds. Good combination. Very cool stuff. DRK Volume 3 will be available in about 3 weeks to DevNet Professional and Devnet Essential subscribers.

Meet “Royale” (codename), a new way to generate Flash user interfaces using XML. Neil Balthaser did a demo from the office of a credit card form that automatically does validation which he build with just a few lines of XML. More on Macromedia Royale to come.

Updating the ColdFusion Exchange

I wanted to let people know that we have been getting some complaints that the ColdFusion Exchange has gotten a little full and that extensions are getting difficult to find, so we are going to be updating the content starting today. If something that you wrote gets removed and you believe it is still current and valuable, please resubmit it.

Getting JRun and CFMX to Work With Java 1.4.1 on OS X

Thanks to Woojin Choi for posting information on getting JRun to work with Java 1.4.1 on OS X. I have made a couple of adjustment to what Woojin posted to match what I found to be effective:

First, back up the jvm.cfg file found here (you will need to use ‘sudo’ to make these changes):


Edit jvm.cfg. Change this…

-client KNOWN
-jvm ALIASED_TO -client
-hotspot ALIASED_TO -client
-server KNOWN
-classic WARN

… to this …


Edit {jrun_installation_dir}/bin/jvm.config, and change this…


… to this …


Give it a try and see what happens!

Making Your ColdFusion Applications More Platform Independent (Part II)

Last Friday, I made a post about writing platform-independent ColdFusion code, and specifically how important it is to be consistent with case when you are naming and referencing files since Unix file systems are case sensitive. The other practice I often see people do which keeps code from being platform independent is hardcoding file separators. The Windows file separator is a “\” (backslash character), however the file separator on Unix file systems is a “/” (forward slash character). The Macintosh file separator is a “:” (colon character), however the OS X file system will let you get away with a Unix-like “/” file separator. If your application needs to construct file paths, and you want your code to be truly platform independent, you will need to take these differences into account.

There are two good ways to make your file separators dynamic. The first is to define the system’s file separator in the Application.cfm file or other file where you keep configuration parameters. For instance, if you add this to your Application.cfm file…

<cfset request.FILE_SEPARATOR = "/" />

… rather than hardcoding slashes throughout your code, you can then simply refer to the request.FILE_SEPARATOR variable.

You can make your life even easier by letting ColdFusion (or, more precisely, Java) figure out what the system’s default file separator is for you with the following function:

function getFileSeparator()
var fileObj = "";
if (isDefined("application._fileSeparator"))
return application._fileSeparator;
fileObj = createObject("java", "");
application._fileSeparator = fileObj.separator;
return getFileSeparator();

This function actually caches the file separator for you the first time you call it so that you are not instantiating a new object each time you call it, however if you prefer to have your calling code do the caching, naturally you can re-factor the function appropriately. The point is that by not hardcoding your file separators, your code is much more platform independent, and much easier to port from one OS to another.

Spotlight on

I was shopping for a new laptop online today and I noticed that is written entirely in ColdFusion. If you are not familiar with, it’s a site that posts great deals on all kinds of geeky things, and gives exact instructions on how to get the best prices (what links to click on, which coupon codes to enter and in what order, etc.). I also thought it was pretty cool that they publish an RSS feed (also generated with ColdFusion) so I can constantly monitor all the best deals on the net and fail even more miserably at not buying superfluous electronics.

Making Your ColdFusion Applications More Platform Independent (Part I)

One of the things I really like about ColdFusion is that it is platform independent. That’s important to me since I use OS X, Linux and Windows on a regular basis, and I like to be able to run the same ColdFusion code on all three platforms. To have this level of flexibility, however, you have to plan ahead a little. ColdFusion is a platform independent language, however if you are not careful, you can very easily write code in a platform specific manner.

The two most common programming practices that I see which keep code from being platform independent is the indiscriminate use of case, and the hardcoding of path separators. This post addresses the importance of being consistent with your case. (My next post will address path separators.)

Platform independent applications must be consistent and accurate in their use of case when referencing files since most Unix operating systems (with the exception of OS X) are case sensitive. In other words, if your files are named with mixed case (like inventoryReport.cfm) you must use the proper case in referencing them on a Unix server. On Windows, you can get away with “inventoryreport.cfm” or even “INVENTORYREPORT.CFM”, however on a Unix platform, you will get a 404 if you do not reference files accurately. Additionally, make sure you use all lowercase when naming your components. ColdFusion MX will automatically lower-case your component names, which you would never notice on Windows, however on Unix, it will become apparent very quickly when you start getting errors that your components do not exist.

For Unix users, case consistency is second nature, however many Windows users mix case on a regular basis. If you want to write platform independent ColdFusion code (which means if you ever envision distributing your code in any way), start paying attention to case.

In my next post, I will write about the pitfalls of path separators, as well as post some code that will do some of the work of making your apps platform independent for you.

Macromedia Releases ColdFusion Updater 3

Macromedia has just released ColdFusion MX Updater 3. The updater applies to ColdFusion MX Server Professional Edition, ColdFusion MX Server Enterprise Edition and ColdFusion MX for J2EE. Macromedia strongly encourages its customers to download and install updater 3 as it contains the latest security and stability functionality. The updater can be downloaded here:

Read the updater release notes here:

Note that updater 3 contains all the updates and fixes of the previous two updaters, so if you install updater 3, you do not need to install the first two.

Show Off Your CFMX for J2EE Projects on

Macromedia obviously knows how many CFMX for J2EE licenses they’ve sold, and approximately how many of those licenses are in production, but what they can’t tell is how many of those are really nice, top-quality sites and applications. It is also impossible to know how many really nice sites or applications are deployed on shared hosting environments. If you have worked on a CFMX for J2EE project that you believe is worthy of notice (or if you otherwise know of one), and you are interested in having your work featured on Macromedia’s website, we want to hear from you!