Save our servers! June 11th, 2007

Sick and tired of getting a million hits, all to the same page, which more often than not hasn’t been updated in the mean time? Want to reduce your bandwidth and server-time loads without necessarily impairing your visitors’ experience of your site?
If you haven’t ever had cause to use it, there’s a standard called ETag [...]

CFJavaXML - a component for cached XML transformations February 9th, 2007

Mark Mandel wrote his own version of Coldfusion’s XmlTransform() function, using the underlying Java transform classes. Although one of his annoyances—that XmlTransform() won’t take any parameters—has been solved in CFMX7, XmlTransform() is nonetheless a slow operation, as the transform engine has to be cranked up, the XSL compiled, the transform effected and then everything garbage-collected, [...]

cfcUnit on Linux January 21st, 2007

Adding a helper framework that lets you unit-test your code can speed up development and refactoring no end. With this in mind, I decided to tame a recalcitrant new Coldfusion application by installing cfcUnit on my local Linux box. It was a sufficiently awkward experience that it’s worth sharing the problems I encountered here. I [...]

Testing across the CF/Java boundary November 23rd, 2006

For reasons of speed I’m currently embedding Java in Coldfusion code. Given Coldfusion is built on Java, and can instantiate Java objects through createObject(”java”, class_name), you’d think that’d be reasonably easy. But the boundary between Coldfusion and Java is like the gap between two halves of a broken bone: jagged, bleeding-edged and painful when coerced [...]

Can’t find a hint September 20th, 2006

I couldn’t find this on the Goggle, so: if your Coldfusion template occasionally furnishes you with the unhelpful, lineless error:
can’t load a null

then this might be caused by the following. You may be trying to compile a function using something like this code:

<cfset bar = “something”>
<cffunction name=”foo”>
    <cfargument name=”bar” default=”#bar#”>
</cffunction>

At the point of trying to interpret [...]

So bad it said nothing, twice March 1st, 2006

E-mail-based error reporting, whether from a system specifically designed to provide it (like Nagios) or as a bolt-on to an application or framework, is only as good as the underlying error diagnostics. So when one of our clients’ Coldfusion app sent me a message today with the brief summary “null null”, the server might as [...]