Getting MongoDB Database And Collection Names From The Connection String

Ben Nadel looks at how to extract MongoDB database and collection names from an ENV-based connection string such that the document database can be consumed more opaquely in Lucee CFML 5.3.6.61.

Creating Pixel-Art Of Ruth Bader Ginsburg Using CSS Box-Shadow In Lucee CFML 5.3.6.61

Ben Nadel attempts to find his happy place and process the loss of Ruth Bader Ginsburg by creating pixel-art of her photo using a large, compound CSS box-shadow and Lucee CFML 5.3.6.61.

I've Had Fundamental Misunderstandings Of How CFQueryParam Works

Ben Nadel realizes that he's had some pretty large, fundamental misunderstandings of how prepared statements are parsed, cached, and executed when using the MySQL JDBC Driver in his ColdFusion / Lucee / CFML applications. And what implications this has for his use of the CFQueryParam tag.

MySQL,CFQueryParam,Prepared Statements And SQL Queries That Use IN Clauses In ColdFusion

Ben Nadel takes a moment to reflect on his mental model prepared statements in MySQL. And how he might use the CFQueryParam tag to go about safely creating prepared statements for SQL queries that use the IN clause with a dynamic set of parameters.

Putting DEBUG Comments In Your SQL Statements Makes FusionReactor Query Tracing

Ben Nadel is thrilled to see that his SQL DEBUG comments show up in both the FusionReactor Cloud and Enterprise dashboards. This makes identifying performance bottlenecks in the database so much easier.

Using A Tracer Cookie To Watch For Browser Download-Prompts In Lucee CFML 5.3.6.61

Ben Nadel explores the idea of using tracer cookies to monitor and respond to download-prompts using Lucee CFML 5.3.6.61. In this demo, he shows an overlay while a report is being generated; and then, closes the overlay when the user is prompted to download the report.

CFDocument Intelligently Reuses Repeated Image Objects In Lucee CFML 5.3.4.80

Ben Nadel looks at how repeated Image objects affect file-size in the CFDocument tag in Lucee CFML 5.3.4.80. It seems that an image is embedded once and then intelligently reused as needed. This should guide how different versions of an image are implemented within a single PDF document.

Using NPM Run-Scripts To Execute Shell Commands In Lucee CFML 5.3.6.61

Ben Nadel explores the idea of using NPM run-scripts to invoke shell commands from Lucee CFML 5.3.6.61 with the help of the CFExecute tag. This allows for some flexibility that is not inherently available in ColdFusion's CFExecute tag.

Using Constants To Help Clarify Boolean Arguments

Ben Nadel continues to noodle on the use of Boolean flags in ColdFusion and JavaScript; and how using named constants can bring some much appreciate clarity to otherwise complex code. This can be done in both ColdFusion / Lucee CFML as well as JavaScript - my two main languages. And, I wanted to share a quick demo.

Proxying Amazon AWS S3 Pre-Signed-URL Uploads Using CFHTTP And Lucee CFML 5.3.6.61

Ben Nadel demonstrates how to proxy uploads to Amazon AWS S3 using pre-signed URLs and the CFHTTP tag in Lucee CFML 5.3.6.61. Such an approach could be helpful for customers that block HTTP traffic to Amazon AWS (for security purposes).

Using UPDATE + ORDER BY + LIMIT To Drive Multi-Worker Migrations In Lucee CFML 5.3.6.61

Ben Nadel demonstrates how the ability to use ORDER BY and LIMIT clauses within an UPDATE statement in MySQL 5.6.37 lays the groundwork for running multiple, parallel workers against a database-driven migration in Lucee CFML 5.3.6.61.

Performing An In-Place Natural Sort On An Alpha-Numeric Array In Lucee CFML 5.3.6.61

Ben Nadel revisits the idea of a "natural sort order" in Lucee CFML 5.3.6.61, this time performing an in-place sort rather than creating an intermediary array. This allows the native sort and the natural sort algorithms to be interchanged seamlessly.

Every Line Of Code That You Write Is An Explicit Decision

Ben Nadel reflects on web application development as being equal parts Science, and Art, and Psychology, and Empathy, and Emotional Intelligence. And why every line of code represents an explicit decision to make an application better or worse.

Evaluating Database Records That Contain Interpolation Expressions

Ben Nadel has fun dynamically evaluating ColdFusion String interpolation expressions that are stored in a database using Adobe ColdFusion 2018. This demo uses the evaluate() and de() functions to merge runtime variables into a database-driven value.

The Default MySQL Driver Settings Do Not Appear To Truncate Long Text In Lucee CFML

Ben Nadel demonstrates that the Enable long text retrieval (CLOB) settings is turned off by default in Adobe ColdFusion's MySQL driver; but, does not appear to impose any character limit or truncation in Lucee CFML 5.3.5.92.

Encapsulating Deep Object-Graph Traversal Using A Visitor Function In Lucee CFML 5.3.6.61

Ben Nadel looks at how to encapsulate arbitrarily deep object-graph traversal using a "visitor function", a set of keys, and a depth-first stack in Lucee CFML 5.3.6.61.

Mapping Arrays-To-Structs And Structs-To-Arrays

Ben Nadel considers mapping between Structs and Arrays, two complete different types of data-strucures. And, how this might be done with a "mapping" function.

Why I Use TINYINT Columns Instead Of BIT Columns For Boolean Data In A MySQL Application

Ben Nadel looks at the imperfect use of BIT and TINYINT fields as representations of a Boolean value in a MySQL database; and, why he prefers to use the TINYINT column-type since the trade-offs make more sense for his style of ColdFusion application development. There is no "right" answer on this topic - this is just my opinion based on my experience and the choices that have come back to haunt me / make my database interactions more challenging.

Testing wkhtmltopdf 0.12.6 With Docker In Lucee CFML 5.3.4.80

Ben Nadel looks at using the wkhtmltopdf project in Lucee CFML 5.3.4.80 to generate PDF documents from dynamic, ColdFusion code. He performs his experiment using the Ortus Solutions' CommandBox Docker container.

Operator Must Return INT-Sized Result In Lucee CFML 5.3.4.80

Ben Nadel demonstrates that the return value of the array.sort() operator in Lucee CFML 5.3.4.80 must fit into a Java Int. If the value is too large, Lucee will throw an error: invalid call of the function ArraySort, return value of the function cannot be casted to an integer.