ColdFusion and OOP - Match Made in Heaven, or Long Road to Hell?

Posted July 14, 2009 at 10:45 AM

Tags: ColdFusion

For a long time, Hal Helms has been my beacon of hope in the world of object oriented programming madness. With many years of OO programming experience across a variety of different languages, I thought, some how, if I could just understand the concepts that he did, I would finally be able to wrap my head around the beast which is OO. As such, I read his articles, subscribed to his occasional newsletter, and even twice attended his "Real World OO" seminar. That said, you can imagine my shock when Clark Valberg came into the office the other day and told me that Hal no longer believes that Object Oriented Programming should be used in ColdFusion specifically.

Say What!!!

This sudden heresy set the stage for some very interesting conversation. And that's just what happened. This last weekend, two of ColdFusion's OO icons - Hal Helms and Brian Kotek - got together with me to duke it out verbally. Brian was pro-OO, Hal was the newly risen opponent of OO, and I was the poor, confused, procedural developer in the middle who didn't know to think (I know it's a stretch, but I pulled it off well).

If you want to listen, Hal Helms has posted his description and a Flash Player for the pod cast. If you want to be part of the conversation, please post your comments to Google Groups so the conversation does not get fragmented.

NOTE: I can't disable comments on my blog, but please do NOT post your comments here.

Post Comment  |  Ask Ben  |  Permalink  |  Print Page



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

Jul 15, 2009 at 2:30 AM // reply »
8 Comments

I would think that learning Java or something similar (C#,C++,Actionscript 3,PHP etc) - (maybe preferably a language with curly braces???) is the best to grasp object oriented thinking. And be a developer who can more than a language. Propably hard to be a expert in it but at least know some other stuff besides one tool or one language. Isn't OO in coldfusion whipping out CFC:s the OO thing? What more lies in it? A CFC is like a class in java but written with tags instead? And OO is not a solution to all problems, sometimes it can be a longer road to a solution when a simpler approach would just be fine.


Jul 15, 2009 at 8:04 AM // reply »
9 Comments

@ Marko
Are you seriously comparing PHP to C# and C++ because they have "curly braces"? How do you suggest these languages relate beside that? Don't you think that PHP by nature is a lot closer to ColdFusion? I guess I must be confused by your definition of the "OO thing" because I love CF but CFCs are close to being classes without being... well classes.


Jul 15, 2009 at 8:13 AM // reply »
8 Comments

@Jean

What I've done with PHP is that you can create classes in the same way as in C# and Java, and thus create object-oriented applications if you wish. Sure, there are some differences and the syntax is not entirely the same. And PHP is loosely typed which Coldfusion is also, but C# and Java are strongly typed. I'm not all that sure about what to call Coldfusion Object Orientation - is it CFC:s?


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 20, 2009 at 11:32 PM
Five Months Without Hungarian Notation And I'm Loving It
I've used headless camel case for years for not only ColdFusion variables, but also SQL tables and fields... pretty much everything involving code. I also subscribe to the "don't abbreviate and clea ... read »
Nov 20, 2009 at 11:00 PM
Five Months Without Hungarian Notation And I'm Loving It
@Marcel, Yeah, I always err on the side of longer but more readable variable names. As for the camel casing of CF methods and the headless camel casing of custom items, I get around this by always ... read »
Nov 20, 2009 at 10:56 PM
Five Months Without Hungarian Notation And I'm Loving It
I use the following and love it: my.namespace.MyComponents.functionMethodsOrUDF() CONSTANT_VALUES_OR_PROPERTIES One thing I always try is to CamelCaseBuiltInColdFusionFunctions() so others can tell ... read »
Nov 20, 2009 at 5:38 PM
Learning ColdFusion 8: CFImage Part I - Reading And Writing Images
Hi Ben, Great article. I've been looking around to see if ColdFusion image engine can programatically create the following "wrap around" effect: http://www.creativepro.com/article/photoshop-s-she ... read »
Nov 20, 2009 at 5:35 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Dave: I talked to Gert he suggested: <cfhttp method="get" url="http://{some cf website}" result="stuff" addtoken="yes" /> Note the addition of cfhttp attribute addtoken. That should persist y ... read »
Nov 20, 2009 at 5:23 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
@Todd, Ahh, gotcha, yeah that makes sense. ... read »
Nov 20, 2009 at 5:17 PM
Maintaining ColdFusion Sessions Across SMS Text Message Requests Without Cookies
Ben, sorry if I didn't make this clear. You can make it work like that if you want, just put <cfset session.foo = 1> (and <cfset application.foo = 1>) in your OnRequestStart() and it reve ... read »