A couple of weeks ago I put up a survey to get some data on how current ColdFusion developers are (or aren't) using object-oriented programming (OOP) techniques. In all, 176 people took the survey, so thanks to everyone who took the time to go through it! As promised, I've done some number crunching on the results and am posting them for folks to see and comment on.
In some ways the results were similar to my expectations, but in a few ways they were also new and illuminating. First up are charts showing the full range of results, along with a few comments.
Most respondents appear to be experienced, long-time CF developers. Given the nature of this blog, and the overall community that reads CF blogs in general, this isn't too surprising.

Most respondents did not major in Computer Science or some related degree. The vast majority are mainly self-taught through books and personal learning, from taking training, or learning on-the-job.
The vast majority have their business logic handled by CFCs.
Almost everyone says they already use OOP or have experimented with it.

The majority say they've seen benefits from OOP, but nearly a quarter think it is somewhat useful but overhyped.

This was somewhat interesting. A third use domain objects for their business logic, but a quarter weren't sure what domain objects are. The remainder tend to use domain objects as data containers or with limited behavior.

Of those who said their domain objects were mainly data containers or had limited behavior, the results were about evenly split. Half weren't sure how or why to use more behavior-rich objects, and half have their object generated for them in some way and didn't see the need to add more behavior to them.

And last, most respondents use UML or understand the basics of it, and of the others, most had read about it or seen presentations on the subject.

After creating these, I thought it would be interesting to break it down a bit more. Using some creative SQL, I generated results for some of the key questions out of just the people who said they use CFCs to hold their business logic:
Perhaps not surprisingly, those who use CFCs were more likely to use OOP or have experimented with it.

CFC users had slightly higher opinions of OOP as well.

Interestingly, among CFC users the liklihood that they use domain objects to handle their business logic went up by 6%, but the percentage who weren't sure what domain objects are stayed relatively constant.

And of those who's domain objects were mainly data containers or contained simple behavior remained almost the same.

And in a last pass at the data, I broke it down to just the people who said they have experimented with or use OOP as their primary approach:
Not too surprising that among OO users, those who think it is very useful was higher.

On the usage of domain objects, OO users were more likely to use them for the majoirty of their business logic compared to the overall results. But unexpectedly (at least to me), over 20% were not sure what domain objects are. Also interesting is the slight decrease compared to CFC users.

The reason for limited behavior in domain objects still stayed about the same.

Familiarity with UML also remained about the same as the results across all respondents.

To me the two key points are that there seem to be a lot of folks who say they use OOP but really don't seem to be doing OOP (because they aren't sure what domain objects are, which are pretty core to the idea of OO). And about a third of respondents appear to be using "anemic domain models", which is something I'm going to try to talk about in my presentation at cf.Objective(). So what do you think about these results? All comments or thoughts are welcome.
Comments (10) |
del.icio.us
|
Digg It!
|
Linking Blogs
| 4892 Views


# Posted By Brian FitzGerald | 2/26/09 1:33 PM
My first thought would be that the terminology could have thrown off newer CF OO people (not me or anything crazy like that!). For example, most of the documentation and articles I read refer to Beans and/or Business Objects, rather than domain objects.
So I'll come clean, I did a quick Google search mid-survey just to confirm that the term domain objects was referring to what I thought it was referring to.
# Posted By Allen | 2/26/09 11:45 PM
Thanks for doing this. It's interesting to see how others are using ColdFusion.
# Posted By Brian | 2/26/09 11:51 PM
@Allen - Sure, glad you found it informative!
@Brian - hmm, I hadn't really thought about that. Though I suspect that it wouldn't make too much of a difference, since I would say people who use domain objects, even if they refer to them as business objects, would still recognize the term. Was anyone else confused on this question? Thx.
# Posted By Ben Nadel | 2/27/09 12:06 AM
sniff sniff... feeling in the sad minority of people who don't program primarily with CFCs. I'm trying to learn, I really am!!
# Posted By Sebastiaan | 2/27/09 5:27 AM
It's sad to see that there were so few respondents who are new to CF...
# Posted By Adam Cameron | 2/27/09 5:57 AM
I had to look up what a "domain object" was. My reaction was "right. So it's the current buzzword for 'an object'".
So I didn't know what one was until I looked it up. Which took about 10sec. I'd presume anyone else who didn't know what the term meant would just look it up too, wouldn't they? Would people really just stare at the screen and go "I don't know what one of those is", and leave it at that?
--
Adam
# Posted By Brian | 2/27/09 11:07 AM
To be fair, I wouldn't call "domain object" a buzzword. I've seen and heard that term for many years. However, it does appear that "business object" is the more prevalent term so I probably should have used that instead. To me at least, it seems more self-evident: domain model is made up of domain objects.
Still, mea culpa. Hopefully it didn't alter the results too badly. I don't think it probably did. After all, people who actually use domain/business objects would most likely understand what was being asked.
# Posted By Brian | 2/27/09 11:07 AM
@Ben - I think you're kidding? I *know* you use CFCs! ;-)
# Posted By Ben Nadel | 2/27/09 11:48 AM
@Brian,
I definitely love CFCs for some cohesive functionality.... but, for shame for shame, much of my business logic is still in my Controller :(
The first step is admitting you have a problem - second step is fixing it. I'm in step 2 of my 2 step program - SCA (spaghetti coders anonymous).
# Posted By Brandon Hansen | 3/4/09 3:17 PM
@Ben
I know that you have always resisted, but pick up a framework or two. That will get you out of your two step program right quick.