Building ColdFusion for the Web
thehistoryoftheweb.com
thehistoryoftheweb.com
CF, while still a commercial product, also has a well-maintained open-source version called Lucee [1]. There's a modern MVC framework called ColdBox [2], and the parent company also produces a number of amazing ecosystem tools like CommandBox [3] (a first-class tool for standing up local dev servers, dependency management, etc) and a modern testing framework [4].
I mostly focus on Rails these days, but there's a number of things I miss from the CFML world. (web GUI for configuration, in-memory ability to query recordsets with SQL, etc). I can't help but chuckle at things like server-rendered components which we were doing in the 90s with CF custom tags.
Do you mean that CF came with a default system to create db-backed configurations with some pre-built UI?
That seems cool but somewhat nasty to deal with when having different environments.
Anyway, I always loved the elegance and simplicity of the SQL embedded in the HTML (from what I remember).
Also interesting how the creator of Coldfusion, Jeremy Allaire, ended up moving to Crypto and creating Circle and USDC, one of the cornerstones of the whole crypto world.
But one of the main reasons it died off is license costs. The last time I was involved in license negotiations with Adobe, they wanted to charge us $100k per cpu core per server per year. These were cloud servers with many cpu cores and there were dev, qa and prod servers. The licensing cost for a single years was astronomical.
There are free versions of ColdFusion (Lucee is the best), but they are far too late for ColdFusion to make any sort of comeback.
The main thing I miss from ColdFusion is cfquery and cfquerypararms and query of queries. I’ve never seen any other language that makes database interactions as easy as those do. Every other language is such an enormous pain to do sql queries, when compared to cfquery.
I started back with 4.5 when I found it on a shelf at the publishing company I worked for in high school - a former employee had won it in a contest at a conference and had no idea what it was. I ended up building an entire ecommerce system on it, building many backoffice apps, connected to the mainframe and building far faster than the green screen programmers ever could. (this is not a critique of mainframes or green screens, there was much value there thats been lost, but I digress)
I am very happy to be away from CF today. it was one thing with macromedia, a different thing when adobe bought it and IMO mismanaged it over the years (I cant believe they still have it tbh, the money they make from legacy apps using it in the enterprise must be enormous), and while lucee started off great, it lost its way and never had enough resources to do things well.
But the biggest thing was that like many niche languages, you end up with a cult of zealots - either true believers, those whose livelihoods are tied to it, or those who are so pot committed to it they have to convince everyone around them that they’re continuing to make the right choice sticking with it. Ive seen it with many niche or dying languages, the ones that have been around as long as this one, really had time to metastasize, theyre the worst though. You cant criticize or critique without causing drama. “evangelists” jumping into every thread, yelling how CF isnt dead, how their latest framework is the one true way, arguing over things that dont matter. I know because I was one of those people for a decent stretch. Not wanting to believe that the language I had chosen and spent so much time with wasnt the the best.
But I also look back fondly on CF, and others like it. PHP, rails, these are looked down on today but there are so many places where they are an excellent choice for the job at hand. Types are fantastic once you reach a level of complexity and size, theyre a hindrance till then. The compiler is great when you reach that size, it slows you down till then. In my “modern” stack at work, there are lots of nice features, but the iteration speed is a tenth of what I had with my server-rendered, JIT, html sprinkled with programming language. We delivered more value, far faster.
So I guess ill just say, thank you CF for what you were, still are for many. If youre on the outside or inside nowadays, dont look down on it, but also dont think about it like religion.
That the ColdFusion programs have been silently doing their thing for a long time without failing is a testament to the strength and durability of the platform. It also says something about what a sleepy, mundane employer I'm with now, but sometimes it's nice to not have to deal with everything around you being a moving part constantly changing its path.
I used it back in 2010-2014, and made some pretty nifty webapps to manage a tournament with brackets and live scores. I thought whoever designed it was bonkers, and the ones who bought into it, even more bonkers. But Ben Nadel showed me the way, bringing some sanity to the language.
The misgiving it had I think was in being expensive and totally proprietary. I think it died sometime after the Adobe acquisition and cost was all I heard about. Interesting that there's a FOSS fork now though!
I also remember coming across something called Railo that appears to have come before Lucee.
I don't know of anything that still ticks those boxes but if you're just looking for (1) easy-ish, (2) interspersing HTML tags and code, and (3) server-side rendered simplicity, then PHP is still a very viable successor.
That said, Lucee is a well-maintained, open-source variant of CFML that you can use today. I still maintain a significant production app that uses it.
The only thing going against it is prejudice, IMHO.
Early PHP was almost always embedded in HTML, like CF. It's been many moons, since I've worked that way, but many developers still do.
(I stopped using it nearly 20 years ago and don't know what has happened since).
I would agree that PHP and CF (at least CF of 20 years ago) are pretty similar conceptually.
I was living in my car and another car stopped at the rest stop making bad noises. I traveled with lots of tools and helped them diagnose the issue, and he said if I could write ColdFusion and PHP they would practically beg me to join (although he used a more sexual phrasing...).
Anyway I declined the offer and got a job writing PHP and Node... :)
Unrelated, but by far the worst part of the class was the requirement to connect to MS Access databases, which were notoriously tricky to avoid locking, after which point the whole application would stop working until you figured out why. Many of us would keep a “clean” snapshot of the database around with the expectation we would somehow break/lock/corrupt the one the website was using. A reboot would also fix it but took a lot longer back then…
All macromedia tech stack dead now, the feelings of ColdFusion developers today, is the same like us legacy AS3 developer.
The fulfillment system was a mess, but that was due to my lack of experience and not due to any issue with ColdFusion.
I will definitely have a look at https://www.lucee.org/ the next time I need to throw together a quick prototype.
It was ironic that I lived in Brazil but because the entire office there spoke Portuguese they always sent me to the Spanish speaking countries. At that point I liked to travel and didn't mind staying in fancy hotels in Argentina and Chile. So all those conversations were in Spanish.
It isn't as funny to refer to ColdFusion as confusāo. I never heard a Brazilian make that joke.
After a few months and several hundred hard-coded files, a helpful fellow at our hosting firm introduced me to ColdFusion and Microsoft Access. That set the foundation for the next twenty-five years of my life, really.
Thanks CF!
If you like working with HTML, don't use tools that introduce proprietary syntax to inject janky control structure and looping logic.
Instead, consider StimulusJS, which allows you to add behaviors to elements in your DOM. It's the sharpest tool you're not using. Give it a shot before smashing that down arrow.
I did. And that’s exactly why I’m smashing that down arrow. It’s highly subjective whether it’s the sharpest tool for the job, because for me it’s not.
I think the "ugly legacy" is a bit of a near-sighted perspective. Today CF's reputation seems limited to being a spaghetti-riddle mix of HTML with logic, but for the era it was built in, it was an amazing language focused on productivity.
Obviously, all of this is highly subjective. When ColdFusion came out, I was primarily working in ASP and its OSS clone, PHP. You'll have to trust me when I say that my opinion on the ugly was formed at the time, and hasn't changed since.
It seems as though folks either like interpolated templates (ASP, PHP, ERb), components (React and etc) or macros (CF, Alpine, HTMX). It could be that one's first true love endures.
But HTMX practically requires server-side state. The whole point is to make it very easy to frequently update, and receive new content from, a server (HATEOAS), and NOT to maintain state client-side. If you're building a site "where the single source of truth is on the server" then HTMX fits perfectly.
As to whether a requirement is typical or not, I am frustrated by local maximum thinking. If your tooling cannot build an ambitious project, then you're not going to build an ambitious project.
I actively try to spend my finite time on ambitious projects in general. You don't need LiveView or StimulusReflex to build a landing page, that's true. But if you're building an ambitious real-time web app, the range of complexity where it makes sense to use HTMX instead of a full-stack solution gets smaller very quickly.
HTMX can accommodate ambitious, real-time web apps. Its entire purpose is to make interacting with a server (that single source of truth) easy, fast and transparent, as if doing so was simply built in to the HTML spec.
What it can't do, is calculate the shape of a bezier curve, and that's why it's not a good choice for building an app like Figma.
I'm reading what you're saying, and it's very clear that you do not understand what frameworks like StimulusReflex and LiveView do for you. There is no fair comparison between HTMX and frameworks that ship with a server-side infrastructure for maintaining a long-lived, persistent connection.
I won't mock you if you set aside your assumptions, investigate and have a moment of illumination.
I know a guy who still insists that MS Access is the best database tool. His identity is fully wrapped up in this being true.
If you look through the progressive responses you've given, you resort less to actual technical points and more to personal attacks. It's weird.
When you stop rage replying and take an honest look at how LiveView or StimulusReflex work - for you actually can build the next Figma with them - you'll see that the comparison between Access and a modern database is pretty apt.
I'm specifically talking about a dramatically higher ceiling of possibility in terms of the problems that you can solve.
If you'd rather exhaust yourself trying to make personal attacks than level up your current local maximum perspective, there's really nothing else I can tell you.
If two people set out to build something like Figma - one in HTMX and one in LiveView - only one is going to ship.
That's not passive aggressive. It is as you say, an actual technical point.
And StimulusJS doesn't?
<div data-controller="modal"
data-action="keydown.esc->modal#close" tabindex="0">
</div> <div data-controller="content-loader"
data-content-loader-url-value="/messages.html"
data-content-loader-refresh-interval-value="5000"></div>
Zealots cannot recognize a custom nonstandard poorly specified DSL even if stares them right in the faceWhat you're showing above is 100% standards HTML 5. Data attributes have been a thing since 2008 or perhaps slightly earlier.
You might not love the look of it, but the markup above is something that your browser understands without interpretation. You can turn off JS and it will render without any issue whatsoever.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...*
This is very different from tooling that uses alternative, non-HTML syntax. Our browsers might be written to be absurdly tolerant of broken markup, but that doesn't mean that Vue/HTMX/Alpine/CFML templates aren't proprietary.
So, which part of these is standardized and non-custom:
keydown.esc->modal#close
content-loader-url-value
content-loader-refresh-interval-value
> This is very different from tooling that uses alternative, non-HTML syntax.Ah yes. Pure HTML syntax of `keydown.esc->modal#close`
It can be any valid characters required by your application.
Of course I'm not confused. You're hung up on the little insignificant part that `x="y"` is a HTML attribute and pretend that this immediately makes it standart non-weird DSL.
Funnily enough you share this with proponents of some other frameworks like lit. "But we use HTML attributes here's an MDN link"
> It can be any valid characters required by your application.
Indeed. So let's look at those characters, shall we.
First it's the literal "proprietary syntax to inject janky control structure" that you complain about. Funily enough you're ignoring this when I'm pointing it out:
click->gallery#next
keydown.ctrl+a->listbox#selectAll
resize@window->gallery#layout
click->gallery#open:capture
scroll->gallery#layout:!passive
Second, you have a literal custom DSL composed of data-attributes. # Passing params to events
data-[controller-name]-[param-name]-param
# "Targets". All elements will be put into an array in [field-name]
data-[controller-name]-target="[field-name]"
# "Outlets" because you need a different name for references
# to instances of other classes
data-[controller-name]-[field-name]-outlet
# Data binding. Much like Vue, it requires a specific
# structure of values present in your code
data-[controller-name]-[value-name]-value
# An additional data binding for CSS classes
# that are also specified separately
data-[controller-name]-[css-class-name]-value
But zealots are completely blind to the fact that they also have a non-standard badly specified hacky DSL because "but we use HTML attributes".HTML attributes were literally created to do the exact thing that you seem to think is a smoking gun.
I've provided the actual facts that you ingored
> HTML attributes were literally created to do the exact thing that you seem to think is a smoking gun.
1. You complain, and I quote, "proprietary syntax to inject janky control structure".
What's this then:
click->gallery#next
keydown.ctrl+a->listbox#selectAll
resize@window->gallery#layout
click->gallery#open:capture
scroll->gallery#layout:!passive
2. Do read up on what DSL means. The fact that you're using custom tags to implement it don't make any less of a DSL, and any less of a proprietary syntax.Though... You know what? Don't bother. Zealots are blind.
Adieu.