Recent Activity
Recent Heroes of the BenNadel.com Community
-
Posted 209 comments since October 23, 2012
-
Posted 59 comments since December 11, 2008
-
Posted 20 comments since February 5, 2010
-
Posted 6 comments since February 24, 2012
-
Posted 10 comments since February 29, 2012
-
Posted 20 comments since December 11, 2008
-
Posted 3 comments since January 30, 2014
-
Posted 5 comments since April 15, 2020
-
Posted 2 comments since November 10, 2022
-
Posted 1 comment since March 29, 2024
-
Posted 1 comment since April 9, 2024
Recent Comments
Ben Nadel replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 26, 2024
I added a base demo to my ColdFusion + Hotwire demos project: https://www.bennadel.com/blog/4643-adding-turbo-cfml-to-my-coldfusion-hotwire-demos-project.htm This uses turbo-cfml instead of @hotwired/turbo. Which allows me to remove all of my URL rewriting shenanigans. SO much easier!... read entire comment from Ben Nadel.
Ben Nadel replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 26, 2024
Also, it looks like the #cfml-8.0.4-2 at the end of my GitHub path wasn't working inside my Docker container. I'm not sure if this is a misunderstanding of how it works (ie, branches vs tags compatibility); or, if there's something fundamentally different about the install inside the Docker image.... read entire comment from Ben Nadel.
Ben Nadel replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 26, 2024
So, I just tried to use this approach inside a Docker container, and I was running into errors. I'm not sure if all of the errors were related to the same root problem. But, ultimately, I had to install git in the Docker container in order to be able to install the dependency from GitHub. It's possi... read entire comment from Ben Nadel.
Ben Nadel replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 24, 2024
Nice 👍 jSoup is great, I use it all the time. I actually author my posts in markdown (via Flexmark) and then run it should jSoup to modify it a bit.... read entire comment from Ben Nadel.
Robert Zehnder replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 24, 2024
@Ben As it turns out, jSoup's parse() method will return tidy HTML so I just ended up running the generated HTML through parse() and write the contents to disk.... read entire comment from Robert Zehnder.
Ben Nadel replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 23, 2024
@Robert, 🤔 So, I think the pre blocks might cause a problem. I don't know how you're authoring your stuff; but I would guess that you might be manually dedenting the code in the pre blocks in order to get it to render correctly. As an example: <section> <p> ... some content ... </p> <div> <pre><c... read entire comment from Ben Nadel.
Robert Zehnder replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 23, 2024
The dedent method is intriguing. I use savecontent with commandbox-ssg (static site generator) to render pages and one issue I have with it is how the html is formed. It is a little annoying, but it renders. That looks like a good fix as long as it plays nice with pre and code blocks,... read entire comment from Robert Zehnder.
Ben Nadel replied to a post Using getApplicationMetadata() To Provide Global Defaults In ColdFusion
Comment posted April 21, 2024
For reference, here's the built-in function - getApplicationSettings() - that Lucee CFML uses to implement this feature. As you can see, it does quite a lot!... read entire comment from Ben Nadel.
Ben Nadel replied to a post Using getApplicationMetadata() To Provide Global Defaults In ColdFusion
Comment posted April 21, 2024
I should mention that - over on Twitter - Zac Spitzer mentioned that the getApplicationMetadata() has some overhead associated with it. I don't know what the magnitude of that would be; but, he's very familiar with how Lucee CFML is implemented.... read entire comment from Ben Nadel.
Ben Nadel replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 21, 2024
@Daniel, Typically what I'll do in my applications is that I have a designated folder for custom tags. For the sake of discussion, let's call it: /lib/tags/ Then, I usually define a per-application mapping in my Application.cfc for this folder: component hint="Application.cfc" { this.mappings = { ... read entire comment from Ben Nadel.
Ben Nadel replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 21, 2024
@Chris, OMG, I can't tel you how many times I've gotten syntax errors because XML documents have leading whitespace. #ParserFail... read entire comment from Ben Nadel.
Ben Nadel replied to a post Accessing ColdFusion Application Settings
Comment posted April 21, 2024
I know this post is 15 years old; but, I just wanted to drop a follow-up post 🤪 in the last decade and a half, ColdFusion has provided us with a means to do this officially with the in-built getApplicationMetadata() function. I've just explored this function for the first time as a means to provide... read entire comment from Ben Nadel.
Daniel replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 21, 2024
how can you make this available in all of your application?... read entire comment from Daniel.
Chris G replied to a post CF_SaveFile Custom Tag In ColdFusion
Comment posted April 21, 2024
The use case that immediately comes to mind for me is archiving off generated transactional emails. Another is generating XML sitemaps, where dedenting isn't just a nice to have, it's necessary.... read entire comment from Chris G.
Ben Nadel replied to a post Dedenting Text In ColdFusion
Comment posted April 20, 2024
This dedenting work wasn't entirely random - it was a stepping stone for my next post on creating a CF_SaveFile ColdFusion custom tag to save buffered content directly to a file (instead of to a variable): https://www.bennadel.com/blog/4638-cf-savefile-custom-tag-in-coldfusion.htm... read entire comment from Ben Nadel.
Ben Nadel replied to a post Creating blockTrim(), inlineTrim(), and trailingTrim() Functions In ColdFusion
Comment posted April 19, 2024
In the comments in my code, I mention the fact that the regular expression multi-line mode (?m) flag doesn't recognize the carriage return. Which is why the pattern matching is a bit more complicated than it otherwise might be. This morning, I asked Chat GPT if I have to care about the carriage retu... read entire comment from Ben Nadel.
Ben Nadel replied to a post Lessons Learned From Sending 7 Million Emails In 5 Days Using ColdFusion
Comment posted April 19, 2024
We're now in the middle of our 4th mass mailer at work, and I've continued to learn some lessons. This morning, I shared how I've been using the Postmark Bounces API to find previously failed emails and exclude them from subsequent mailings: https://www.bennadel.com/blog/4636-paginating-the-postmark... read entire comment from Ben Nadel.
Ben Nadel replied to a post Understanding The TrimWhitespace() Function In Lucee CFML
Comment posted April 17, 2024
As a related code kata, I've created some additional trimming functions: blockTrim(), inlineTrim(), and trailingTrim(): https://www.bennadel.com/blog/4635-creating-blocktrim-inlinetrim-and-trailingtrim-functions-in-coldfusion.htm... read entire comment from Ben Nadel.
Ben Nadel replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 16, 2024
@All, As a quick follow-up, this post was just a stepping-stone for my next post on actually extracting JSON data embedded within a static HTML file: https://www.bennadel.com/blog/4632-extracting-json-embedded-within-a-generate-html-file-in-coldfusion.htm It's an uncommon use-case; but, this allows ... read entire comment from Ben Nadel.
Ben Nadel replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
Now you're going back like 30-years 🤣 deep cut!... read entire comment from Ben Nadel.
Chris G replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
@Ben Nadel, Iconic! I just need to know one thing when I join a zoom call... where's the beef?!... read entire comment from Chris G.
Ben Nadel replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
When I get on a Zoom call, I'll still be like Whhhaaaaaaaazzuuuup?! 😜 One of the best commercials ever.... read entire comment from Ben Nadel.
Chris G replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
@Ben Nadel, It's true, but it's been making a comeback and is relevant again! Haha... read entire comment from Chris G.
Ben Nadel replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
@Chris, Ha ha, I had to google for the meme. I guess that's an old Martin Lawrence reference from the 90s. Kicking it old-school today! 🤣... read entire comment from Ben Nadel.
Ben Nadel replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
@Will, The moment you have a commenting system in a business app, people start using emoji 😜 that's just life now, it seems. But, in this particular case, it would only matter when trying to parse the data - as long as we're UTF-8 encoding all the things, emojis should "just work" seamlessly. The h... read entire comment from Ben Nadel.
Chris G replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
Daaaamn, Gina! This is some fancy code-dancing you're doing to decodeForJavascript. I like it! And I'm impressed!... read entire comment from Chris G.
Ben Nadel replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 15, 2024
@Christopher, I don't have any direct experience with Rails; but, it seems that so much of the productivity comes from the holistic nature of the ecosystem. All the stuff that Rails can do with Turbo, we can do in CFML. But, Rails basically builds all these helper methods into the server-side framew... read entire comment from Ben Nadel.
Ben Nadel replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 15, 2024
@Steve, If I'm being honest about my preference for htmx over Turbo, though, it is probably mostly just because that is the one I found first. ... ha ha, but ain't that the truth with most things 😆 Years ago, I was at a JavaScript conference in NYC and Douglas Crawford (creator of the JSON specific... read entire comment from Ben Nadel.
Christopher Stewart replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 15, 2024
There is a ridiculous simplicity with Rails / Hotwire that I love. To update table results. after_create_commit {broadcast_prepend_to "requests"} after_update_commit {broadcast_replace_to "requests"} after_destroy_commit {broadcast_remove_to "requests"} <tbody id="requests"> <%= turbo_stream_fro... read entire comment from Christopher Stewart.
Will B. replied to a post Decoding The EncodeForJavaScript() Output In ColdFusion
Comment posted April 15, 2024
This is great code to share. And a good lesson about > 65535 characters. (Didn't even know that was a thing!) I also like how you only dip to Java if necessary. Likely, most "business data" probably won't contain the emojis (I guess depending on the audience), so a little less overhead there most of... read entire comment from Will B..
Steve Bryant replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 15, 2024
@Ben Nadel, Yeah, I love using hx- attributes with regular ones for progressive enhancement. I use hx-boost pretty rarely, really, and use that approach the rest of the time. I really like the flexibility of that over the "boost" approach that Turbo seems to take. Like you for htmx, however, I haven... read entire comment from Steve Bryant.
Ben Nadel replied to a post Dynamically Swapping Input / Keyboard InputMode On iOS
Comment posted April 15, 2024
One thing to be careful of with inputmode; or, more specifically with pattern is that it can trigger the browser's native form validation. This may or may not be what you want. In my case, I ran into a situation where all my inputs were truly "text", but I was using the inputmode/pattern changes to ... read entire comment from Ben Nadel.
Ben Nadel replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 13, 2024
@Steve, This could simply be a perception problem. I've only read some blogs and took a Udemy course on HTMX, I haven't actually built anything with it. So, any feelings I have on the matter are all academic at this point. Perhaps so much of what I've constructed as a mental modal stems from the fac... read entire comment from Ben Nadel.
Justin Treher replied to a post Feature Flags Book: Feature Flags, An Introduction
Comment posted April 12, 2024
Hi Ben, Just wanted to check to see if you read this book as a reference? https://www.amazon.com/Feature-Management-LaunchDarkly-Discover-production/dp/1800562977 I've read your book about 2.5 times now and this is the only other big resource I've found. I know that if we aren't using LaunchDarkly, ... read entire comment from Justin Treher.
Steve Bryant replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 12, 2024
That's funny. I keep hearing people say that Turbo handles progressive enhancement better than htmx, but I like the way htmx handles it. I strongly suspect that means that I just don't appreciate something basic about Turbo. In htmx, I can use a <form action="page.cfm"> or a < a href="page.cfm"> and... read entire comment from Steve Bryant.
Ben Nadel replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 11, 2024
@Christopher, The HTMX stuff is very interesting as well. This week, I actually just watched HTMX: The Practical Guide on Udemy by Maximilian Schwarzmüller. I think there's a lot of overlap between the HTMX and the Hotwire approaches. But, I think one difference is that Hotwire seems to err harder o... read entire comment from Ben Nadel.
Christopher Stewart replied to a post Forking Hotwire Turbo To Make It ColdFusion Compatible
Comment posted April 11, 2024
Awesome! I will have to check this out when I get some time. Side bar, I ended up using HTMX for a project for some of the hotwire-esque interactivity and it worked great. https://htmx.org/... read entire comment from Christopher Stewart.
Ben Nadel replied to a post Hotwire Turbo Drive Doesn't Work With .cfm Page Extensions
Comment posted April 11, 2024
As of Turbo 8, the file-extensions are still hard-coded into the Turbo library (ie, not exposed as a configuration option for the developer). I'm not yet ready to give up on using Hotwire in my ColdFusion projects. So, I've taken to forking the Turbo repository and updating the RegExp pattern matchi... read entire comment from Ben Nadel.
Ben Nadel replied to a post The User Experience (UX) Of Disabled Form Buttons
Comment posted April 9, 2024
@Javier, Good insight about mobile devices. I mostly do work for desktop devices (and try to test on mobile when I can). The set of mobile caveats is far from my fingertips, so this stuff is great to hear about.... read entire comment from Ben Nadel.
Javier Aragones Carrion replied to a post The User Experience (UX) Of Disabled Form Buttons
Comment posted April 9, 2024
There is something else I think no one talks about. On touch devices, if we do late validation, since there are no onblur events, the state of the submit button can only change when tapping outside of a given input (or control). This means that when completing or modifying the last required input, t... read entire comment from Javier Aragones Carrion.
Ben Nadel replied to a post You Can Include Delimiters In The Result Of JavaScript's String .split() Method When Using Capturing Groups
Comment posted April 2, 2024
So, apparently I completely forgot about this post. 7-years later, I just ran into this behavior again; forgot that I wrote about it in 2017; and then just wrote about it again (2024): https://www.bennadel.com/blog/4628-understanding-regexp-capture-groups-when-using-split-in-javascript.htm I have a ... read entire comment from Ben Nadel.
Ben Nadel replied to a post Understanding RegExp Capture Groups When Using .split() In JavaScript
Comment posted April 2, 2024
Ha ha—it turns out that I actually wrote about this back in 2017 (seven years ago!): You Can Include Delimiters In The Result Of JavaScript's String .split() Method When Using Capturing Groups So, at the end of this current post when I say, "Hopefully I will remember this caveat going forward", it d... read entire comment from Ben Nadel.
Ben Nadel replied to a post Always Include Charset With fileRead() In ColdFusion
Comment posted April 2, 2024
@Tyler, My pleasure! It's one of those super subtle bugs because it doesn't "break", per se, it just doesn't work 😆... read entire comment from Ben Nadel.
Tyler replied to a post Always Include Charset With fileRead() In ColdFusion
Comment posted April 2, 2024
Thank you for this! I had some Japanese encoding go weird but everything worked fine locally. I also had to apply this to fileWrite() as well. Figured it had something to do with windows server.... read entire comment from Tyler.
Ben Nadel replied to a post Using VALUES / ROW To Create Derived Table From Static Values In MySQL 8.0.19
Comment posted April 1, 2024
@Scott, Ah, great question. The main different is in what comes back when there is no matching record in the database. Given a list of emails, using the VALUES approach will yield the same list back even if the LEFT OUTER JOIN fails. However, by using IN(), you will only get back the list of emails ... read entire comment from Ben Nadel.
Scott Stroz replied to a post Using VALUES / ROW To Create Derived Table From Static Values In MySQL 8.0.19
Comment posted April 1, 2024
How is that more concise than: select email, id from member where email in ({list of email addresses})?... read entire comment from Scott Stroz.
Ben Nadel replied to a post Using SELECT And UNION ALL To JOIN SQL Tables To CSV Data In MySQL
Comment posted March 31, 2024
As of MySQL 8.0.19, this whole concept gets even easier. There is now a VALUES / ROW construct that is purpose built for providing static data as a derived table: https://www.bennadel.com/blog/4626-using-values-row-to-create-derived-table-from-static-values-in-mysql-8-0-19.htm It removes all of the ... read entire comment from Ben Nadel.
Ben Nadel replied to a post On Ending Path Variables With A Slash (Or Not) In ColdFusion
Comment posted March 31, 2024
@Chris, Heck yeah! I always want to be able to connect emotionally with the way that I write code. Once I can find the "right" approach to do something, then I believe it will become instinctual. And then I never have to worry about it again 💪... read entire comment from Ben Nadel.
Chris G replied to a post On Ending Path Variables With A Slash (Or Not) In ColdFusion
Comment posted March 30, 2024
Firstly, I love that you have these conversations and that you care about such things. I feel less alone, and I'm here for it 💯. Like you, I strongly lean towards leaving the trailing / out of path variables. Readable code is top priority!... read entire comment from Chris G.
Ben Nadel replied to a post Using CFModule To Render Templates With Isolation In ColdFusion
Comment posted March 29, 2024
@Pete, I still have a warm place in my heart for custom tags. It's one of the very few presentations I've ever given. There's almost certainly some overhead; but, I have to imagine that it is next-to-nothing when you only use a few per request. That said, you now have me curious to poke at the probl... read entire comment from Ben Nadel.