August 31, 2002

Bug hunting?

Yes, it's all very well trying to chalk up as many bugs in CFMX as you can find over at cfbughunt.org but it won't help any of them get fixed! If you find a bug in ColdFusion MX (or any other Macromedia product), please report them through the Macromedia Software Feature Request and Bug Report.

Posted by seancorfield at 08:49 AM | Comments (0) | personal

August 26, 2002

Got .class?

A few people have been asking recently how do you figure out which .class file in the WEB-INF/cfclasses directory is generated from which source file - mostly when they want to delete a single file to force recompilation and they have multiple index.cfm files! The answer comes from Mike Nimer:


The generated filename is cf + mapped-filename + hash-code (+ .class). The mapped-filename is obtained by taking the full root-relative pathname of the file and replacing directory separators with __ (double underscore) and any characters that are not valid in a Java identifier with their two-digit hex equivalent. The hash-code is the (Java) hashCode() of the File object which represents the file (see Sun's documentation). If the hashCode() result is negative, it is exclusive-OR'd with 0xFFFFFFFF to get the value used by ColdFusion.


Batch scripts to compile .cfm pages have started to appear in various people's blogs so I won't reproduce them here.

Posted by seancorfield at 03:28 PM | Comments (0) | cf

Flogging Flash

Our very own Dave Humphreys has created a blog aggregator for Flash-related blogs. It includes Google's news service in the aggregate and let's you subscribe to the 'daily flog' by email.

Posted by seancorfield at 10:35 AM | Comments (0) | blogging

August 25, 2002

DevCon 2003

If you can't make it to Macromedia DevCon 2002 in Orlando, FL this October, perhaps you can make it to DevCon 2003 in San Diego, CA (September) or to MX DownUnder AsiaPac Macromedia DevCon, which will be held in Sydney, Australia in February 2003?

Posted by seancorfield at 04:54 PM | Comments (0) | mx

August 24, 2002

DevCon 2002

You can save $155 if you hurry up and register for Macromedia DevCon 2002 now! I hope to see plenty of you there. I'll mostly be staffing the community suite as well as helping out in a few of the sessions.

Posted by seancorfield at 09:24 PM | Comments (0) | mx

August 23, 2002

Paradigm Shift

Benoit Hediard (MVCF) recently posted the following link on cf-talk: First Impressions of ColdFusion MX: Fusebox is Toast?. The article dates back to May 20, 2002 but it's very interesting to see how much of a revelation ColdFusion Components were to the article's author, Ben Rogers. For someone like myself, with a heavy OO background and coming to CF first through the MX release, it can be difficult to get a sense of how CFMX looks to the 'old hands' so I enjoy articles like this one.

And is Fusebox toast? No, but Ben explains why Fusebox could be less compelling now that ColdFusion Components exist.

Posted by seancorfield at 09:15 PM | Comments (0) | TrackBack | architecture | cf | programming

August 21, 2002

CFTipsPlus

Another ColdFusion "tips" web site was just brought to my attention: ColdFusion Tips Plus | CFTipsPlus.com - A ColdFusion ezine delivered to your email every week. With tips on ColdFusion, JavaScript, HTML, Design, and more. I haven't had time to delve into the site too much yet but it looks interesting.

Posted by seancorfield at 08:26 AM | Comments (0) | cf

MVCF

As proof that ColdFusion MX allows much more expressive approaches to building web sites, Benoit Hediard has put together a methodology based on applying the Model-View-Controller paradigm to ColdFusion. You can read about it on his Benorama :: ColdFusion MX web site. I'll blog my thoughts about it here once I've had time to read through more thoroughly.

Posted by seancorfield at 08:22 AM | Comments (0) | TrackBack | architecture | cf | programming

August 17, 2002

OT

It's rare that I find an Off-Topic subject worth mentioning here but a friend sent me a link to a fascinating web site, The Simulation Argument, created by Dr. Nick Bostrom who is a transhumanist philosopher. I commonly joke that there are only 400 real people in the world, everyone else is smoke and mirrors, which is why my friend sent me the link. Enjoy!
Posted by seancorfield at 10:18 PM | Comments (0) | TrackBack | personal

August 16, 2002

ColdFusion Components

Ben Forta has a great new article on the Designer & Developer Center this week, called Using ColdFusion Components -- Properly. It'll help you write more reusable code!

Posted by seancorfield at 03:25 PM | Comments (0) | cf

The Answers Panel

If you use Dreamweaver MX (or Fireworks MX or Flash MX), you may have noticed a panel called "Answers". It's a great way to get the latest hints & tips for these products and you can also search for tech notes or product extensions, from the comfort of your favorite authoring environment! You can read all about it in this month's Logged In column on the Designer & Developer Center.

Posted by seancorfield at 02:27 PM | Comments (0) | mx

August 15, 2002

Tips

cf-talk recently had a discussion about best practices and, in addition to mentioning the Coding Guidelines I published and the Macromedia Tips Application, someone pointed out this fledgling site: HOW2CF - Your source for ColdFusion Answers. There's only a few tips there at the moment but, like the Macromedia Tips Application, these things take time. I'll keep an eye on it and see how it develops.

Posted by seancorfield at 10:36 PM | Comments (0) | TrackBack | cf | macromedia

August 14, 2002

LDAP & Web Services

An interesting article: Using Cold Fusion Web Services To Query an LDAP Server. It's nice to see ColdFusion MX covered on a site that is primarily focused on ASP and VBscript!

Posted by seancorfield at 03:12 PM | Comments (0) | cf

August 07, 2002

Vacation

I'm on vacation until 8/14 so no blogging for a while.

Posted by seancorfield at 08:14 PM | Comments (0) | personal

August 06, 2002

One to watch...

By contrast, the #coldfusion channel on DALnet seems friendly and, in the short time I've been on channel, seems to on-topic.
IRC is a strange place and it doesn't suit everyone. If you don't know what IRC is or how to join the channels I'm talking about, the chances are that you won't like IRC... It's kind of the old-school Internet, much like BBS and Usenet... But it has an immediacy that forums and mailing lists lack so it definitely has it's uses.
Posted by seancorfield at 08:14 PM | Comments (0) | TrackBack | personal

One to avoid...

There are many resources for ColdFusion developers: mailing lists, forums, web sites, even IRC chat channels. Someone suggested #coldfusion on EFnet but since they just kicked & banned House of Fusion owner, Michael Dinowitz, you might want to give that channel a wide birth. I visited for six or seven hours and saw nothing relating to ColdFusion being discussed. When I dared to join the discussion Michael was having on channel, I too was kicked & banned. Avoid!

Posted by seancorfield at 12:12 PM | Comments (0)

August 05, 2002

Developer Edition & IP addresses

The Developer Edition of ColdFusion MX allows you to access the server from the local machine (IP 127.0.0.1) and one other IP address. The way it does this is to remember the first non-local IP address that accesses the server and write it to the license.properties file in {CFMX}/lib. With the CF5 Developer Edition, you could only access the server from one IP but it 'forgot' that IP every time you restarted the server. With CFMX, you get two IP addresses - one of them is always localhost - but it permanently remembers the additional IP address (until you edit the license file and restart the server).

Posted by seancorfield at 05:35 PM | Comments (0) | cf

argumentCollection

There are several ways to pass arguments to a function when you invoke it: positional arguments, named arguments, argumentCollection and cfinvokeargument. Positional arguments is how you would normally invoke a UDF:


res = myUDF(arg1, arg2, arg3);

Named arguments is where you specify the actual argument names with their values:


res = myUDF(x=arg1, y=arg2, z=arg3);

This allows you to specify the arguments in any order, for example the following call is identical:


res = myUDF(z=arg3, x=arg1, y=arg2);

If you use cfinvoke to call a function in a component, you can specify named arguments in the invocation:


<cfinvoke component="cmp" method="foo"
x="#arg1#" z="#arg3#" y="#arg2#"
returnvariable="res"/>

You can also specify arguments to the cfinvoke tag by using the cfinvokeargument tag:


<cfinvoke component="cmp" method="foo"
x="#arg1#" y="#arg2#"
returnvariable="res">
<cfinvokeargument name="z" value="#arg3#"/>
</cfinvoke>

If there are duplicates between the named arguments and the cfinvokeargument names, the latter takes precedence.


The argumentCollection mechanism allows you to specify your arguments in a struct and pass that as a single argument:


args = structNew();
args.x = arg1;
args.y = arg2;
args.z = arg3;
res = myUDF(argumentCollection=args);

You can even mix this form with named arguments:


res = myUDF(argumentCollection=args,x=42);

In this case, the explicitly named arguments will override the arguments specified in the args struct. I actually think this would be more useful if it were the other way around - which would allow the explicitly named arguments to act as defaults for missing values in the argumentCollection struct but that's not how it works.


However, if you try to mix argumentCollection with named arguments in a cfinvoke tag, the argumentCollection struct is totally ignored! This is a bug - it should work. Fortunately, there are two workarounds. You can either specify the named arguments with cfinvokeargument or you can change argumentCollection to attributeCollection as these two examples indicate:


<cfinvoke component="cmp" method="foo"
argumentCollection="#args#"
returnvariable="res">
<cfinvokeargument name="z" value="#arg3#"/>
</cfinvoke>

or:


<cfinvoke component="cmp" method="foo"
attributeCollection="#args#"
z="#arg3#"
returnvariable="res"/>

Since this is a known bug that will be fixed in a future release, my advice would be to use the former workaround. Why does the second workaround even work? Well, attributeCollection is how you pass a group of arguments (attributes) to a custom tag so presumably the machinery is supported since this makes it easier for ColdFusion MX to implement (in Java) the custom tag machinery.

Posted by seancorfield at 03:29 PM | Comments (0) | cf

August 01, 2002

Web Services (& other DesDev updates)

The Macromedia - Designer & Developer Center has just added a whole bunch of new content including a Web Services topic with a lot of interesting articles. I'm also pleased to say that this blog is featured in its own article!

Posted by seancorfield at 05:57 PM | Comments (0) | cf

SQL client tools

Several people I know use Toad to interact with databases while developing ColdFusion applications. It seems like a very good freeware tool for Windows. On the Mac, I just tried SQL Grinder and I like it a lot. It isn't free but it seems like it would be $50 well-spent on shareware.

Posted by seancorfield at 03:28 PM | Comments (0) | osx

Ten years and counting...

Macromedia is ten years old. There's a nice presentation on the web site about how it got from there to here: Macromedia: The Story.

Posted by seancorfield at 03:08 PM | Comments (0) | macromedia

More performance notes

This time on Windows vs Unix and bang for your buck. A very interesting article on the LinuxWorld web site, called Why you should take a Mac user to lunch - Jul 24, 2002, looks at price/performance across platforms.
I managed to persuade CFMX on Mac OSX to consume the Amazon web service. Nice. But in the process I broken Web Service stub-generation for CFCs under the web root. Back to my ongoing configuration investigations!
Posted by seancorfield at 02:50 PM | Comments (0) | TrackBack | osx