Skip to main content
Ben Nadel at the New York ColdFusion User Group (Sep. 2009) with: Aaron Foss
Ben Nadel at the New York ColdFusion User Group (Sep. 2009) with: Aaron Foss

Recent Blog Posts by Ben Nadel

Using ColdFusion For Rapid Application Prototyping

By Ben Nadel on
Tags: ColdFusion

People often talk about ColdFusion as a "Rapid Application Development" (RAD) platform; which it is. But lately, I've been using it for rapid application prototyping; and I've been reminded of just how much friction ColdFusion removes from the development process. And of how many native CFML constructs exist to make the collocation of behavior seamless. In this post, I'm not looking at anything fancy — I'm just celebrating what ColdFusion does naturally... read more →

Adding OnMissingTemplate() ColdFusion Event Handler To Big Sexy Poems

By Ben Nadel on
Tags: ColdFusion

In the ColdFusion Application.cfc framework component, the onError() event handler is invoked if an error goes un-handled in your CFML code. However, if the incoming request never makes it to your CFML code, the onError() event handler is moot. Such is the default behavior when a client requests a non-existent .cfm or .cfc template. For better insight into possible application bugs, I've add the onMissingTemplate() event handler to Big Sexy Poems... read more →

Keyboard Shortcut For Moving Focus To Form Using Alpine.js

By Ben Nadel on

For the past 15 years (or so), I've used the autofocus attribute to move cursor focus to a given form input control upon page load. But, as I've become more attune to accessibility (a11y) concerns, I've become hesitant about stealing focus and potentially disrupting the feedback provided by assistive technologies. That said, I still really want that ease-of-access for myself. As such, I've added a custom Alpine.js directive to Big Sexy Poems that will move focus to the first form input when I press the (f) key... read more →

Generating, Serving, And Caching Open Graph Images Using ColdFusion

By Ben Nadel on
Tags: ColdFusion

A few days ago, I looked at using ColdFusion to generate text-based Open Graph images with CFImage. ColdFusion itself doesn't have all the tools necessary to do this; so I ended up dipping into the Java layer for text-layout calculations. Once I had an algorithm that worked, I started to integrate those dynamic Open Graph (OG) images into Big Sexy Poems. And at that point, I had to figure out how to safely expose the image generation without creating too much of an attack surface for malicious actors... read more →

Working On Open Graph Images For Big Sexy Poems In ColdFusion

By Ben Nadel on
Tags: ColdFusion

When a link is rendered on a social platform (such as LinkedIn or Facebook), the social platform will look for Open Graph (OG) meta tags defined within the target link. The social platform will then use these meta tags to render a preview of the link directly within the social feed. For Big Sexy Poems, I want to OG image to be a preview of the poem itself. Since each poem is going to be completely different, and can change at any moment, the OG image has to be generated on-the-fly. ColdFusion provides some image functionality; but, much of what I need for this effort will require dipping into the Java layer... read more →

Using Custom Fonts In CommandBox Docker Image And Windows ColdFusion

By Ben Nadel on
Tags: ColdFusion

In Big Sexy Poems, I need to create dynamic Open Graph (OG) images for my poem share links using CFImage. I don't know exactly what those will look like yet; but I know that I'll render poem-specific text into the image. Out of the box, the CommandBox Docker image contains nothing more than the default JVM fonts. As such, I need to install custom fonts for CFImage in both my local Docker image as well as my Windows VPS (Virtual Private Server)... read more →

Utilities For Generating "id" / "for" Attributes In ColdFusion

By Ben Nadel on

At PAI Industries, I've been working on a prototype for a new intranet application. This prototype contains many data entry forms. Normally, when I build forms, I hand-code the id attribute on inputs and the for attribute on the associated labels. But for the prototype, I've been using a utility method that constructs these values using a simple counter. And I kind of like it. It feels like one less piece of boilerplate that I have to think about... read more →

What If "Maybe" Was A Core Data Type In ColdFusion

By Ben Nadel on
Tags: ColdFusion

For the last few years, I've been using the concept of a "maybe" value in my ColdFusion applications. In my CFML code, a "Maybe" is just an object that wraps a value that may or may not exist. The wrapper object exposes an exists property which indicates whether or not the value property is populated. Heretofore, I've been implementing this pattern as just that — a pattern; but now I'm trying to elevate the concept into more of a first-class citizen... read more →

Using "pageshow" Event To Re-enable Forms After Back-Button Navigation

By Ben Nadel on

In Big Sexy Poems, I have an Alpine.js directive that binds to my ColdFusion forms, listens for the submit event, and prevents accidental double-submission by setting a flag and disabling the submit button(s). After I started using this directive, I noticed that my forms would remain disabled when I navigated back to them using the browser's Back Button. This is because the browser pulls the ColdFusion form page out of the "bfcache", which re-renders whatever state the page was in at the previous point of unload... read more →

I Will Not Be Enabling Full Null Support In Adobe ColdFusion 2025

By Ben Nadel on
Tags: ColdFusion

I'm using Big Sexy Poems as a ColdFusion playground for new application architecture ideas. One of the ideas that I've been considering is enabling "full null support" at the application level. Historically, dealing with null / undefined values in ColdFusion has been a little tricky. Ideally, ColdFusion would treat null / undefined values the way JavaScript does (which is seamlessly). But, I don't know what "full null support" even means because I can't find any documentation at all on the Adobe ColdFusion site. As such, I wanted to run a few tests to see how it might change my ColdFusion style... read more →

Using A Hidden Submit Button To Ensure Unnamed Submissions

By Ben Nadel on

Most of my web forms have a single, primary submit button. Which means, anything the user does to trigger a form submission will "just work" as expected. But, every now and then, I'll provide a secondary, named submit button that allows the user to submit the form with a modified behavior. Unfortunately, this named submit button is often higher-up in the DOM (Document Object Model) than the primary submit button; which means, the browser uses the named submit button as the implied requestor during certain submissions. This is usually not what I want; but is something we can fix with the use of a hidden submit button... read more →

A Quick Look At The ITaskEventHandler Mechanics In Adobe ColdFusion

By Ben Nadel on
Tags: ColdFusion

For years, I've been using the URL-based mechanics to invoke scheduled tasks in both Adobe ColdFusion and Lucee CFML. But, I recently learned that there's an alternate means of invoking a scheduled task: the eventHandler. In the CFSchedule tag, you can use the eventHandler attribute to point ColdFusion to a component rather than a URL... read more →

Making CFDump Easier To Read As I Get Older

By Ben Nadel on
Tags: ColdFusion

After decades of staring at a screen, my eyes aren't what they used to be. In most digital contexts, I immediately increase the font-size by 10-20% before I do anything else. This "maturing" has made me acutely aware of how absurdly small the output from Adobe ColdFusion's CFDump and writeDump() functions are. I know that some developers use custom implementations of CFDump in order to exert more control. But for the moment, I'm trying to keep it simple. To that end, my approach to increasing the readability of the CFDump output is to inject a <style> tag that overrides Adobe's styles using CSS specificity... read more →

Normalizing Query Cross Join Data Using Namespaces In ColdFusion

By Ben Nadel on
Tags: ColdFusion, SQL

For simple CRUD (Create, Read, Update, Delete) queries, I'm usually working with a single database record at a time. But, for user interfaces (UIs) that require more "reporting" style data, I'll often use a more complex, cross join SQL query in order to avoid N+1 query problems. When using JOINs in this manner, I like to namespace the data from each table using a {table}_ prefix. Then, when collating the data back on the ColdFusion side, I'll normalize this data back into separate objects. Historically, this has been a very manual process. I'm trying to find ways to make this a little less manual... read more →

Functions For Coalescing Values In ColdFusion

By Ben Nadel on
Tags: ColdFusion

In BigSexyPoems, I've been maintaining a CFWheels-inspired file of globally available ColdFusion user defined functions (UDFs). Last week, I added several UDFs in order to be able to "coalesce" a set of inputs down into a single value. Specifically, I wanted to be able to create a default poem name if the user didn't provide one... read more →

ColdFusion Custom Tags Should Have An End-Tag For Clarity

By Ben Nadel on
Tags: ColdFusion

I've always been a big fan of custom tags in ColdFusion. But, in the last few years especially, I've ramped up my usage as part of my home-grown web application framework. In doing so, I've had to evolve the way I think about custom tags. Today, this evolution continues. Going forward, I'll start using self-closing custom tags as a rule (in a tag-based context) in order to provide clarity. Or, as James Moberg said in his CFSummit 2025 presentation, to "be explicit"... read more →

Telling My ColdFusion Connector/J JDBC MySql Connection String To Use UTC

By Ben Nadel on
Tags: ColdFusion, SQL

UPDATE, Oct 24, 2025: Ultimately, I ran into issues with this and couldn't get it to work the way I wanted. I was hoping to be able to let my server run in any timezone it wanted; but, I kept getting Connector/J behaviors that were converting with the dates either going into or coming out of the database. As such, I finally gave-in and changed my server to use UTC (Coordinated Universal Time). Now, the server, the JVM, and the MySQL process are all running in the same timezone... read more →

Evolving Code Methodology: IF/ELSE Should Fit On One Screen

By Ben Nadel on
Tags: ColdFusion

When it comes to branching logic in my code, I prefer guard statements with early returns whenever possible. But, such control flow isn't always possible, especially in a View file. In these cases, I'm evolving the heuristics used for my syntactic choices:.. read more →

Exploring "previous" And "next" Mechanics In HTMX

By Ben Nadel on

In the htmx hx-target attribute, you can target peripheral elements by applying previous and next predicates to your CSS selectors. At first, I thought this was just scanning up and down the list of sibling nodes in the same way that the .prev() and .next() methods worked in jQuery. But, upon closer inspection of the source code, I discovered that it was using a technique I had never seen before: htmx was comparing the "document position" of relative nodes... read more →

The Romantic Comedy Crisis

By Ben Nadel on
Tags: Life

The Romantic Comedy Crisis.. read more →

Adobe ColdFusion Bug: Nested Array Iteration Breaks Closure Variables

By Ben Nadel on
Tags: ColdFusion

While working on my Big Sexy Poems app (GitHub), I ran into another wild bug in Adobe ColdFusion (see previous post). I don't exactly know how to articulate this one; but, it seems that if I perform nested array iteration within the context of an asynchronous array iteration, closed-over variables are no longer available within a closure scope... read more →

Adobe ColdFusion Bug: CFQuery Tag Leaks SQL To Output Within Array Iteration

By Ben Nadel on
Tags: ColdFusion

Things on this blog have been fairly quiet lately — in a post-Lucy world, my brain has been less focused. I've been trying to keep it busy by working on my Big Sexy Poems app (GitHub). And, while doing so, I've run into to a few wild bugs in ColdFusion. The first of which is that the CFQuery tag appears to leak its SQL statement into the output buffer if invoked from within array iteration mechanics... read more →

You Can Modify Elements During Filtering In ColdFusion

By Ben Nadel on
Tags: ColdFusion

I have a mental hurdle to overcome: every time I modify an element during an array .filter() operation, I feel dirty. I feel like I've violated some sort of semantic contract. But, this contract is an entirely self-imposed constraint. The problem is, words have weight. And the fact that the method is called "filter" has allowed my ignorant little caveman brain to believe that filtering is the only thing this method should be doing. I need to grow-up and stop this nonsense... read more →

Life After Dog

By Ben Nadel on
Tags: Life

I never wanted a dog — I wanted a simple life. My wife was the one who wanted a dog. And so we got a dog. "Lucy" was the reject. They kept her in the back of a pet store in Chelsea and only brought her out when someone asked for a Yorkie. My wife fell instantly in love. But had to spend 20 minutes convincing me that this was the one. And so, on August 24, 2012 at 6pm, I became a dog person... read more →

Polyfill URL Search Parameter Grouping Using Bracket Notation In Adobe ColdFusion

By Ben Nadel on
Tags: ColdFusion

A few months ago, I wrote about how to polyfill Lucee CFML's form field grouping behavior using field names that end with []. It's such a great feature and I use it all the time for forms that have sets of related checkboxes and text fields. But, after chatting with Mary Jo Sminkey earlier this week, I wondered if the same technique could be applied to the URL search parameters... read more →

Explicit Arguments Always Override ArgumentCollection In ColdFusion

By Ben Nadel on
Tags: ColdFusion

In ColdFusion, you can use the argumentCollection keyword to propagate a set of predefined arguments to a function invocation. For those familiar with other programming languages, the argumentCollection is like a more flexible "spread" operator. When a function is invoked using argumentCollection, any and all of the parameters can be further overridden by an explicitly-provided argument. As a sanity check, I wanted to demonstrate to myself that it doesn't matter where the argumentCollection goes within the list of parameters... read more →

Creating Runtime Extensions And Polyfills In ColdFusion

By Ben Nadel on
Tags: ColdFusion

At PAI Industries, we use the CFWheels ColdFusion framework. Wheels has a lot of "magic" baked into it. Some of it is great; and, some of it I'm not crazy about; but, the one thing that I can't get out of my mind is the use of e() as an alias for encodeForHtml(). A few weeks ago, I wrote about using alias functions for encodeForHtml() and encodeForHtmlAttribute(); and, the consensus within the comments was that it was too mysterious. And, I agree. So I wanted to revisit the idea with a more explicit implementation... read more →

Reflectively Accessing Built-In Functions In ColdFusion

By Ben Nadel on
Tags: ColdFusion

Don't do this. It doesn't really work. Built-in functions, in ColdFusion, just weren't really designed to be passed-around as references. I'm putting this exploration here purely for my own reference (no put intended)... read more →

Customizing The Router In The CFWheels ColdFusion Framework

By Ben Nadel on
Tags: ColdFusion

Like all of the ColdFusion frameworks, CFWheels provides a router that declaratively maps URLs onto Controller actions (the "C" in "MVC"). However, the convenience methods that Wheels provides out-of-the-box don't necessarily align with how I want to build a ColdFusion application. And so, I needed a way to customize the router (aka, the "mapper"). To do this, I created a proxy component that manipulates the mapper state internally and exposes a more Ben-friendly API... read more →

Sequence Generator Utility

By Ben Nadel on

I sometimes have the need to generate a sequence of values. Whether it be a set of CSS utility classes or a list of fake users, the ability to create a set of incrementing numbers is quite helpful. In SublimeText (my text editor of choice), I can use the Arithmetic features to do this. However, the Arithmetic features use Python, and I'm more of a JavaScript guy. So, I created a sequence generator utility for my site that dynamically evaluates a JavaScript template literal over a custom numeric range and gives me the full power of JavaScript... read more →


I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel
Managed hosting services provided by:
xByte Cloud Logo