ColdFusion Makes Hard Things Very Easy

This is not the first time I’ve made the claim that ColdFusion makes things easy. This has been my chief reason for loving ColdFusion from day one. I’m going to take a few tasks, and show you how easy ColdFusion makes them.

Get some data out of a database and display it on a page:


SELECT firstName, lastname
FROM app.artists


#FirstName# #lastName#

Querying from a database using CFQuery just feels natural and easy. I personally hate saving SQL to a string, then attaching it to query object that I then execute. Looping over the results of query is also simple and straightforward. I don’t have to worry about addressing the query in a collection or other structure, CFoutput handles looping over the results and pointing my call of “firstname” to the firstname column in the current row of the results.

Send a short email to someone:


This is a test message

Similar to the database query, sending mail from ColdFusion is just drop dead simple. More than that, it’s pretty intuitive. It’s hard to not understand what is going on here.

These are pretty standard, and most tools have patterns written for them to make this sort of basic functionality easy to write. So let’s take on some harder tasks.

Create a PDF from some content:

Hello World


I contend that printing a document to the PDF Print driver takes more effort than doing it in ColdFusion. Feel free to disagree.

Create an image for use in CAPTCHA testing:


Notwithstanding everyone’s hatred for CAPTCHA, that’s shockingly easy to create a CAPTCHA image.

Okay, again nothing we did was too crazy but you have to admit that is some really easy, concise, easy to comprehend code. Let’s do something a little harder.

Pull all appointments named “Lunch” from your Exchange Server:




I’ve said it before, the only way of working with Exchange that is easier than ColdFusion is Outlook.

Pass a result generated from .Net to a Java string for use by a custom Java Library:



Interoperability between .Net and Java, in two lines of code? That’s kinda ridiculous.

Now, to be clear here, I’m not saying you can’t do all of this in other languages, I’m saying this is the easiest I’ve ever seen it done. The team behind ColdFusion has done a great job of balancing between encapsulating the difficult, but making it easy to go beyond what they enabled. All of the tags used in the examples have many more attributes that you can use to fine to the behavior show off here.

This was a overview of how easy ColdFusion makes it to do hard things, in the next series post I will talk more about what you can do with ColdFusion when ColdFusion can’t do what you want it to do. (That’s not a typo.)

5 thoughts on “ColdFusion Makes Hard Things Very Easy

  1. Nice work, Terry!

    Perhaps we should have a web site “makeshiteasy.com” where there’s just a gazillion crazy examples of how it just ain’t easier than with CF. My personal favorite is the oft forgotten query of queries, but I dig your .NET to Java in two lines too.

    Kevin

Leave a Reply

Your email address will not be published. Required fields are marked *