Recent Activity
Recent Heroes of the BenNadel.com Community
-
Posted 214 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 11 comments since March 4, 2022
-
Posted 82 comments since December 11, 2008
-
Posted 3 comments since December 11, 2008
-
Posted 12 comments since November 4, 2009
-
Posted 10 comments since February 29, 2012
-
Posted 3 comments since January 30, 2014
-
Posted 1 comment since April 9, 2024
-
Posted 1 comment since May 3, 2024
-
Posted 1 comment since May 7, 2024
Recent Comments
Ben Nadel replied to a post Using Google reCAPTCHA v3 In ColdFusion
Comment posted May 7, 2024
@Chris, I remember seeing that in the docs. But, in my particular case, I didn't have much of an option—my app only has one public page, which is the login form. As such, I never had the chance to look into implementing a more robust integration.... read entire comment from Ben Nadel.
Chris Bowyer replied to a post Using Google reCAPTCHA v3 In ColdFusion
Comment posted May 7, 2024
Hi, Ben. Great article! However, Google vaguely states on their https://developers.google.com/recaptcha/docs/v3 page: "reCAPTCHA works best when it has the most context about interactions with your site, which comes from seeing both legitimate and abusive behavior. For this reason, we recommend incl... read entire comment from Chris Bowyer.
Ben Nadel replied to a post Where Does Serialization / Deserialization Belong In A Database Access Workflow?
Comment posted May 6, 2024
@Andrew, Looks solid to me 💪... read entire comment from Ben Nadel.
Andrew Kretzer replied to a post Where Does Serialization / Deserialization Belong In A Database Access Workflow?
Comment posted May 6, 2024
Fair enough, using your syntax, I'd just do this: public array function getJobByID( required numeric id ) { return queryExecute( " SELECT j.id, j.details FROM job j WHERE j.id = :id ", { id: { value: id, cfsqltype: "cf_sql_bigint" } }, { result: ... read entire comment from Andrew Kretzer.
Ben Nadel replied to a post Where Does Serialization / Deserialization Belong In A Database Access Workflow?
Comment posted May 6, 2024
@Andrew, That's totally legit. The only thing that I get frustrated about the Query.map() is that it generates another query. I almost with there was a Query method for .mapToArray(). But, that's just a personal preference, not a value judgement.... read entire comment from Ben Nadel.
Andrew Kretzer replied to a post Where Does Serialization / Deserialization Belong In A Database Access Workflow?
Comment posted May 6, 2024
I do the same, though I just add a .map() to the end of the queryExecute rather than adding in a separate loop.... read entire comment from Andrew Kretzer.
Ben Nadel replied to a post Spreading SQL And CFQueryParam Tags Across Multiple Function Calls In Lucee CFML 5.2.9.40
Comment posted May 5, 2024
So, I was just attempting to use this technique (splitting tags across function calls) in the context of CFHttp / CFHttpParam tags, and it seems that Adobe ColdFusion doesn't work this way. Splitting tags is a Lucee CFML only feature (tested in Adobe ColdFusion 2021 and 2023). Attempting to split CF... read entire comment from Ben Nadel.
Ben Nadel replied to a post Spreading Http And HttpParam Tags Across Multiple Function Calls In Lucee CFML 5.3.8.201
Comment posted May 5, 2024
Ugggg, so, I was just trying this technique in Adobe ColdFusion and it throws the error: Context validation error for tag cfhttpparam. The tag must be nested inside a cfhttp tag. Super lame! This is true in both ACF 2021 and 2023. It doesn't make sense - the whole base-tag context mechanisms are (al... read entire comment from Ben Nadel.
Ben Nadel replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted May 5, 2024
@Mike, The Layer and Container CSS work is ever-green at this point; but, the Google Baseline project is still classifying them as "Newly available". I think the cut-off from "newly" to "widely" is something like 30-months. To be completely transparent, I used to be tied to IE11 for so long. And now... read entire comment from Ben Nadel.
Mike Kelp replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted May 5, 2024
This is interesting stuff and also caused me to check the status of @layer which we've wanted for similar functionality. Turns out it's implementation is much more widely supported now: https://caniuse.com/?search=%40layer Similarly, @container for responsive breakpoints on specific containers seems... read entire comment from Mike Kelp.
Ben Nadel replied to a post Feature Flags Book: Feature Flags, An Introduction
Comment posted May 4, 2024
@Justin, So, I know of the LaunchDarkly book; but, made the decision to basically look at no prior art when I wrote my book. Since I've never written a book before, and certainly not one on this topic, I was afraid that reading anything like-minded books would anchor me into a position of what a boo... read entire comment from Ben Nadel.
Ben Nadel replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 4, 2024
@Gary, I think so. By sane, I meant a default value that is relevant to the app. Preferably using whatever default value the application logic will be inserting once the code has been updated.... read entire comment from Ben Nadel.
Gary Funk replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 3, 2024
Hey, Ben, Add a new database column with a sane DEFAULT value. Are you sure you mean to use the word, 'sane?'... read entire comment from Gary Funk.
Ben Nadel replied to a post Ask Ben: Converting An XML Document Into A Nested ColdFusion Struct
Comment posted May 3, 2024
@Mik, Ah, checking back on the Lucee Dev list, it loos like you got everything sorted. Great!... read entire comment from Ben Nadel.
Ben Nadel replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 2, 2024
@Will, Everything you just said hits home with me. Even though my company has been in a situation in which having UUID would have made life a lot easier (migrating records from one system to another), I still don't think I would have used UUIDs if I could go back and do it all again. UUIDs solve a v... read entire comment from Ben Nadel.
Will B. replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 2, 2024
@Ben Nadel, Oh, definitely IDENTITY is solid, we don't want to be calculating that in Coldfusion! Ha! On the "UUID vs. IDENTITY (int)" argument, there was a time that I was interested in moving that direction. Simply because moving data between databases, creating population scripts, etc. would be f... read entire comment from Will B..
Ben Nadel replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 2, 2024
@Will, You mention "identity column" - that's definitely a case where I still just lean on the AUTO_INCREMENT feature of the database. I know that "best practices" these days say that the primary key should be some sort of UUID that is generated by the client. But, I just haven't wrapped my head aro... read entire comment from Ben Nadel.
Ben Nadel replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 2, 2024
@Will, When you have multiple applications writing to the same database, that's a whole other box of worms 🤣 In that kind of scenario, I say you have carte blanche to do whatever keeps the data the most stable. I know from experience that these "integration databases" can get pretty hairy. To this ... read entire comment from Ben Nadel.
Will B. replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 2, 2024
@Chris G, Hmmm. That might be the very ONE thing I would consider keeping as a DEFAULT. Unless one wants to fudge the data for some reason. If you also have an identity column, though, that's going to be a lot harder. Heh.... read entire comment from Will B..
Chris G replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 2, 2024
You make a strong point, and I am a fan of having a single source of truth...which is one of the reasons I find React so appealing. I've mostly used DEFAULT for createdAt columns, which makes the most sense to me. But yeah... maybe I shouldn't any longer 🤔... read entire comment from Chris G.
Will B. replied to a post Why I Avoid DEFAULT Column Values In My SQL Database
Comment posted May 2, 2024
I agree. However, if there are multiple, different applications that write to the database, that "source of truth" would shift. At my current gig, 100% of database read, write and search operations are done through Stored Procedures (MSSQL). This primarily helps with optimization, but also ensures c... read entire comment from Will B..
Ben Nadel replied to a post Ask Ben: Converting An XML Document Into A Nested ColdFusion Struct
Comment posted May 2, 2024
@Mik, I'll take a look later today (or, at least I'll try 😛).... read entire comment from Ben Nadel.
Mik Muller replied to a post Ask Ben: Converting An XML Document Into A Nested ColdFusion Struct
Comment posted May 2, 2024
Hey Ben, I'm trying to make create a loop of some kind over YouTube's playlist XML. Have you ever tried to parse that out into a neat query or loop? That's something the CFM World would love to have! https://dev.lucee.org/t/pulling-a-youtube-playlist-xml-into-a-query-result/13814... read entire comment from Mik Muller.
Ben Nadel replied to a post Pretty-Printing JSON Using GSON In Lucee CFML 5.3.9.141
Comment posted May 2, 2024
@James, I'm a bit confused—wouldn't escaping the HTML normally make it more safe? Is there some sort of combination of escape sequences that can expose a vulnerability?... read entire comment from Ben Nadel.
James Moberg replied to a post Pretty-Printing JSON Using GSON In Lucee CFML 5.3.9.141
Comment posted May 2, 2024
To prevent HTML escaping (and make your JSON potentially HTML unsafe), use disableHtmlEscaping. The disableHtmlEscaping() method tells Gson not to escape HTML characters such as <, >, &, =, and '. var gson = createObject("java", "com.google.gson.GsonBuilder", jarPaths) .init() .disableHtmlEscaping... read entire comment from James Moberg.
Ben Nadel replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted April 30, 2024
@Chris, Ha ha, awesome! Glad you're liking it. I feel like I need to start building something small with it to get a sense of how it works. I'm a bit overwhelmed at the sheer number of variables. But, I really do love a good set of constraints. I'll definitely be diving in soon!... read entire comment from Ben Nadel.
Chris G replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted April 30, 2024
@Ben, Ok, Open Props is beyond amazing! Already a huge fan. What an incredible productivity multiplier...consistent, great naming conventions, compostable, beautiful, wow...just wow!... read entire comment from Chris G.
Chris G replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted April 29, 2024
@Ben Nadel, Yes! I'm not 90 tabs bad, but at times I'm 20 tabs bad! Haha I hope once you understand why they're so pumped about tailwind, you'll be able to share it with us as you always do. When I see something like class="bg-slate-100 rounded-xl p-8 dark:bg-slate-800", I admire the simplicity and ... read entire comment from Chris G.
Ben Nadel replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted April 29, 2024
@Chris, You ever get on a video call, and someone does a screen share and they have like 90 tabs open 😱 😱 re: Tailwind CSS, I'm kind of in the same boat. I just started this course on Udemy, Tailwind CSS From Scratch. I know I could just read the documentation; but, I kind of want someone to just ... read entire comment from Ben Nadel.
Chris G replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted April 29, 2024
@Ben Nadel, Ahhh...the tabnag! I have a few of those open myself. Would make for interesting dev meetup conversation starters. Tailwind CSS confounds me. I hear the hype, but I must be too dense to see why it's so hype worthy. When I look at it, I see very difficult to read and maintain, long, convo... read entire comment from Chris G.
Ben Nadel replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted April 29, 2024
@Chris, I'm pretty sure that I heard Adam mention it once or twice on the CSS Podcast that he does with Una Kravets. I've had it open in a tab for many months. I only just finally started to peek into it because I've been looking into Tailwind CSS; and this felt very on-point for that kind of stuff.... read entire comment from Ben Nadel.
Chris G replied to a post Using :where() To Reduce CSS Specificity Issues
Comment posted April 29, 2024
I'm intrigued...and I know Jason Lengstorf (the interviewer) too! Definitely watching the video on open props today! Curious...how did open props catch your attention? This is the first I'm hearing of it.... read entire comment from Chris G.
Ben Nadel replied to a post Exploring Turbo Drive Back-Button Caching Behavior In Lucee CFML
Comment posted April 28, 2024
On a related note, here's another exploration in which I look at the execution of inline script tags in conjunction with caching: https://www.bennadel.com/blog/4644-inline-script-tag-execution-in-hotwire-turbo-and-coldfusion.htm... 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
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.