Ben Nadel has an interesting question on his blog about including sub-applications from within an existing CF application, and having the relevant sub-level Application.cfc fire off.
This is doable in a fairly simple manner but which relies on a barely-documented feature of ColdFusion, and the fact that the sub-level Application.cfc fires is completely undocumented, and may [...]
Entries Tagged as 'ColdFusion'
ColdFusion Including Sub-Applications
May 30th, 2008 · 2 Comments · ColdFusion, Programming
Tags: application.cfc·ColdFusion·kludge
Relative CFLoop Performance for Various Loop Structures
May 21st, 2008 · 6 Comments · ColdFusion, Programming
Introduction
Jim over at Ben Nadel’s blog made the assertion that looping a list is faster than looping a struct. It’s an interesting assertion that looping a list would be faster than looping an array. I did a test of my own to find out.
Setup
Starting with objects with 1 entry populated, I increased the number of [...]
Tags: ColdFusion·lists·loop·performance·Programming
CFThread and dividing up work
April 23rd, 2008 · 2 Comments · ColdFusion, Programming
CFThread is a wonderful addition to ColdFusion 8. It lets you perform parallel actions within your code. However, parallel programming is a complex beast under the best of circumstances.
One of the early things to realize in CF8’s threading support is that it makes a deep copy of the local variables (ala Duplicate()) when [...]
Tags: ColdFusion·threads
ColdFusion 8.0.1 - Nested Array/Struct Shorthand
April 10th, 2008 · No Comments · ColdFusion, Programming
As you probably know, ColdFusion 8 gave us a long-needed shorthand for creating arrays and structures:
a = “1″,
b = “2″,
c = “3″
}>
“a”,
“b”,
“c”
]>
Unfortunately you couldn’t nest those constructs. With the 8.0.1 updater though, you now can:
a = ["x", "y", "z"],
b = ["s", "t", "u"],
c = ["m", "n", "o"]
}>
This is fantastic when you’re trying to make [...]
Tags: ColdFusion
Follow up to Real Time Command Execution Feedback Post
April 9th, 2008 · No Comments · ColdFusion, Programming
With ColdFuison 8.0.1 Adobe has introduced errorVariable and/or errorFile to the attributes of the tag. You can only use one of the two in the same tag.
This will give some insight once the tag has completed execution if there is an error. Before there was no way for CF to report errors to [...]
Tags: ColdFusion
ColdFusion Preserve POST variable name case
April 1st, 2008 · 3 Comments · ColdFusion, Programming
ColdFusion provides access to POSTed data via the FORM structure. Unfortunately ColdFusion always upper-cases the names of these variables. Recently a chunk of code I was working on needed to know the original case of these keys. At first I worked on passing a hidden form field with the original field name [...]
Tags: ColdFusion
ColdFusion REMatchAll
April 1st, 2008 · No Comments · ColdFusion, Programming
This ColdFusion method offers functionality similar to PHP’s preg_match_all function. It searches for the supplied regular expression in the supplied text. The return value is an array with one entry for each time the pattern matches the string. The array entries are structs with a numbered element for each parenthesized sub-expression within [...]
Tags: ColdFusion·regular expressions (regexp)·udf
Real Time Command Execution Feedback
March 27th, 2008 · No Comments · ColdFusion, Programming
Did you ever write a utility ColdFusion script which uses <cfexecute> to run a command and send output back to the browser? It makes for convenient and monitorable remote execution of certain repetitive tasks. My most common use for this sort of thing is for example an rsync process which can be invoked [...]
Tags: ColdFusion·Java·threads