A Challenge for ColdFusion Developers...

This is a callout to all ColdFusion developers young and old whether your brand new to ColdFusion or you have been working with it for years--whether you are a seasoned programmer from another language or you have only ever written a Hello World application, I have a challenge for you.

In response to both Sean and Brian's posts about the community focusing on non-ColdFusion developers, I wanted to have some what of a discussion about this.

I strongly feel that one of the main issues that is holding back the ability for ColdFusion have this huge involved excited community is the lack of today's standards that it enforces in software development. Don't get me wrong, I think that ColdFusion 8 is a great step ahead for ColdFusion than past versions as far as being extremely integrated with other technologies like Java and .NET as well as incredible PDF document support, AJAX, XML etc. However, the one thing that I really feel ColdFusion is missing, is the promotion of good software design out of the box.

I do not know of any developer that got started with ColdFusion that got right into learning it in an object-oriented manner. I personally did not learn it this way. In fact, it was until I took Java programming courses in college that I had the desire to program ColdFusion in this manner. I think part of the issue lies in the available documentation for ColdFusion, such as published books and articles. Rarely have I seen object orientation promoted in the early phases of learning ColdFusion. Yet in other classes that I have taken on the very languages of Java, C#, C++ and Visual Basic, every single one of those classes was centered around programming in an object-oriented manner.

Now I know that ColdFusion has always boasted in being the language of choice in having a very small learning curve and being very powerful at the same time. In my opinion, that is also it's weakness. Yes I will admit it was great in the beginning when I was first learning it, to be able to pull up database queries in a snap and send stuff back to the database with ease. Now, however, after I have worked at Boeing and have had to deal with some legacy applications that were built in ColdFusion I am not a happy camper.

I am thrilled that there are the communities centered around the frameworks for ColdFusion such as Mach-II, Fusebox, and Model-Glue, but there needs to be an even stronger urge to those that are new to ColdFusion to also take that extra step and learn how to develop ColdFusion code in a structured well designed manner.

I will say this as my final remark because I have a feeling I will get comments that allude to this anyway, perhaps it is the fact that ColdFusion is not meant to be an object oriented language and that is not it's end goal. If the goal of ColdFusion is to be a rapid application development language then all these are moot points. I think that if ColdFusion is really going to succeed in the next 10-20 years, than it better be prepared to be setup with the same architectural structure as other languages like C++ and Java. Ten years ago, we did not build Internet applications the way we do today, but let's face it, the Internet applications today are much more powerful and do a lot more than they used to. It's time we start building them right.

Please share your comments, thoughts, constructive critcism, ideas, etc. I really want to know what the community thinks at large. Get this out to your friends who are new to ColdFusion and encourage them to post. What is missing from the community, what can be improved?

Thanks.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Kyle, looks like you and I are not only thinking along the same lines but have experienced learning CF in a very similar manner. It was not until I had completed my Java classes in college that I began to ask some questions related to OO and CF. Prior to that I had been hearing some conversations in the dark corners of the CFUG meetings related to supposed CF shortcomings. I have really never considered the lack of true OO architecture to be a shortcoming of CF as I never saw CF as intending to be that in the first place. The question which comes to my mind is : Does the CF community wish for CF to be something that it is not? If so, what is it and what can the community do to implement change. The other issue which is present is the need for continued concentration on community development. This means new members, continued and greater support for improvement of existing members, and I think a greater degree of community project development. I referenced Ruby as a model for community in my blog related to this topic. Regardless, I really want to see a huge amount of community growth over the next few years. How do we get there?
# Posted By doug | 10/7/07 9:06 PM
@doug:

Oh good, I am so glad that someone else is there with me on my thoughts. I was kind of half afraid that I would be blind posting this hoping I was not going to get torn down.

You brought up some very valid points. Are we pushing CF to be something that it is not? And yes, I want us to have the same kind of community that .NET and PHP and Ruby developers have. I would even go as far to say, I challenge our community to be as intense, expressive, motivated and excited as the Ubuntu community. Now there's commitment.
# Posted By Kyle Hayes | 10/7/07 9:23 PM
I was having the same reservations about publishing my thoughts on this as well. I then thought that not discussing this stuff is probably part of the problem, so go ahead and tear me down - I'm not going to take it personal any way. Plus, its my blog and I can say whatever I want (-; So far I am feeling good about the responses I've seen over multiple blogs. Pretty interesting that similar discussions are popping up around our community blogs....hmmm - maybe people are thinking on the same lines.
# Posted By doug | 10/7/07 9:40 PM
I concur. I think this has been missing for a long time. You have the WACK books, which are great for those just trying to learn and then, blam... dozens of communities revolving around either Fusebox, Mach-II, etc. There doesn't seem to be an intermediate graceful direction between them all.
# Posted By Todd Rafferty | 10/8/07 3:52 AM
As somebody who is wrestling with OO CF I agree with Todd that there needs to be more intermediate resources, but speaking as an experienced PHP programmer I have to say that I think that the online ColdFusion community is far more focused and close-knit than the PHP community. I may get shot down in flames here (by PHP people), but I think that the widespread adoption of PHP has served to water down the genuinely good resources with loads of substandard content.

Although it took me some time to fully immerse myself in the online CF community I now have about half a dozen blogs that I read daily and provide me with all the news and support I could ask for (apart from that elusive intermediate procedural-to-OOP resource)!
# Posted By James Marshall | 10/8/07 5:53 AM
@James: Your type are exactly the kind of people I hope comment on this post. It is folks like you who we need to hear from. But I also found interesting what you said about the PHP community and I believe you are right.

I had to get full immersed into PHP a few years ago when CF was not an option for a project I was working on. I was surprised at the time, like you said, how watered down it was.
# Posted By Kyle Hayes | 10/8/07 6:00 AM
Totally agree Kyle--I made this comment in a blog post or article of some sort quite some time ago and I think it still holds true. When you learn Java, you don't learn a whole ton of syntax and then learn OOP as "advanced Java." In Java literature you start with objects from day one because that's the way you're supposed to program in Java.

CF should be the same way. I agree that one of CF's major strengths is how easy it is to get into the language, so while we don't want to lose that, we also don't want to spend most of the time teaching people about the language features only to introduce CFCs as something "advanced." Introduce things "correctly" (IMO anyway) from day one.

I took a Flex course recently that drove this point home. After a very simple "Hello World" example we immediately dove into custom events because they're at the heart of well-architected Flex applications. The same goes for CF--CFCs should be introduced very early so it doesn't turn into a huge mindshift later down the road.
# Posted By Matt Woodward | 10/8/07 7:38 AM
I can agree with that. One thing though, just because you can do OO with CFCs doesn't mean you have to. It's one thing to be familiar with CFCs and use them, something else to apply OO principals to it all.
# Posted By Todd Rafferty | 10/8/07 7:45 AM
@Matt and Todd: Both of you are right on this one...so...

We need to do something about this in that we need to get developers to recognize that CFCs are integral part to developing code...and not just stop there. We then need to show them how CFCs fit in to good object-oriented design.
# Posted By Kyle Hayes | 10/8/07 7:49 AM
While I agree with your sentiments, I have to interject here.

An artist never starts off creating masterpieces. The artist learns techniques, how to apply those techniques to different medium, etc. Then, after having found the techniques and medium that they favor, that's when they hone their skills, and eventually make incredible works of art.

I feel that any programmer has to (learn / be taught) the proper techniques. The programming languages are tools that one leverages to create internet goodness. Each language has different strengths and weaknesses. Sometimes you choose the language based on your proficiency, sometimes the language is chosen for you.

I guess after all this rambling, I agree with your basic premise, there needs to be a stronger drive in the CF community towards creating tutorials, example applications, etc. that focus on "the best practices".

I've seen plenty of posts on creating MVC applications in most of the frameworks, and that's all well and good. But once that "eureka" moment hit me, and I started <strong>really</strong> using CFCs as objects (instantiation, inheritance, etc.), it's really hard to even look at some of the old code that I wrote.
# Posted By Rand Thacker | 10/8/07 8:06 AM
I have to agree with Rand, and go a little further. In any discussion about Coldfusion adoption, that it is easy to learn, and doesn't constrain beginners is a good thing. Let people in the door, then hit them with best practices. One of the things I truly love about ColdFusion is how quickly someone can become productive. We shoudln't get rid of that because it gives people the freedom to write crappy code.
# Posted By Terrence P Ryan | 10/8/07 8:29 AM
I've been working on a couple of Primers about moving from procedural to OO programming with Coldfusion:

http://www.iknowkungfoo.com/blog/index.cfm/Primers...

Now that MAX is over, I'll be adding more very soon.

I was at Brian's BOF sessions and had a lot of fun. Hopefully next year we can get more time for them.
# Posted By Adrian J. Moreno | 10/8/07 8:49 AM
I too learned the "old way" of ColdFusion development. I started writing apps against CF 3 so there was no thinking of OO back then for CF. Now after learning OO concepts and using several of the frameworks available, I write everything in that manner and prefer ColdBox as my framework. So I agree with alot of what you are saying.

However, I think we as a community, need to be careful not to put ColdFusion into a box. We have to be very careful not to over-commit to the OOCF ways of doing things and forget that one of the biggest draws of ColdFusion is its strength as a rapid application development language. Thats one of the things that pulls a lot of newer developers to ColdFusion. We as a community have to conitinue to support that as well as do a better job of transitioning those newer developers to doing things in an OO manner.
# Posted By Russ Johnson | 10/8/07 8:52 AM
@Adrian - Great to see! We need more of this kind of stuff!

@Russ - I fully agree that we need to ensure that CF stays at the top of its game with RAD. That doesn't mean, however, that it should be crappy code. You can do good RAD without any of the frameworks out there. As long as you are still using CFCs and functions to structure out good reusable code, you are already doing it better than the developer who writes it all in their CFM pages.
# Posted By Kyle Hayes | 10/8/07 9:00 AM
I really think it's a matter of describing what all the various constructs available within ColdFusion are best suited to, for example:
* CFML pages: for displaying data, creating forms, etc. Not for business logic except when related directly to the view.

* CFCs: contain business logic and as a rule don't output anything. (I know I'll get some blowback on that comment, but that's my opinion!)

* Custom Tags: great for reusing view logic, doing common formatting, etc.

That's just to get the discussion going. In short, I don't think this is an either/or situation where we sacrifice ease of use and low barrier to entry for "doing things right." Even if it's just telling people from day one to put queries in CFCs as opposed to CFML pages, and to call the method that returns a query from their CFML pages, that's a huge step in the right direction.
# Posted By Matt Woodward | 10/8/07 9:25 AM
I guess I'm just tired of the "If it's not OOP'ed, you're not doing it right." You don't need an oversized cannon for everything you're working on. I don't mind mixing at times.
# Posted By Todd Rafferty | 10/8/07 9:35 AM
I think more tutorials like Adrian's would be great. But what I would really like to see is a side by side comparison of an actual app (preferably something a bit more advanced than a hello world app) done in procedural code and full-blown CF OO code. Where are the performance gains / losses? Why is there a performance difference? "Cleaner Code" is nice, but does it really get me any performance benefits? Has anyone really done any load testing on the same app done in 2 different methods?

As a side note, I believe both methods have their place and both are necessary for CF to thrive in the future.

There's probably a book in all of this just waiting to be written...might only sell 100 copies, but I would buy it!
# Posted By JD | 10/8/07 9:51 AM
Performance should not be the primary consideration, maintainability should be. A well-architected OO application is infinitely more maintainable than a procedural one.
# Posted By Matt Woodward | 10/8/07 10:12 AM
Maintainability can be done by anyone who can organize things appropriately, coming up with a standard and such just simply hashing things together.

* I'm 100% for separation of logic from presentation, etc.
* I'm also 100% for making sure the applications are 100% portable, but it can be done without diving into OOP.

My code is far from straight procedural and OOP. If anything, I think I found a comfortable balance between them. Sometimes I wonder if everyone likes making everything more complicated than it needs to be.
# Posted By Todd Rafferty | 10/8/07 10:19 AM
@Todd - It's interesting that you mention portability...

ColdFusion applications, as they stand today, are not portable applications. They are only portable to other ColdFusion instances which cost a lot of money. Take PHP, ASP.NET, LAMP etc, which are completely free. If a company wants that, the products are free. This is of course set aside from hardware configs. We are just talking software here.
# Posted By Kyle Hayes | 10/8/07 10:28 AM
I agree with Matt's point. You don't get into .net today as a noob and learn how they did ASP it back in the pre .net days. You should start learning the proper methodologies from day 1. In part this is because, as many of us know, it is such a difficult transition to make.

I am really hoping this doesn't get into another "You're condescending about my procedural coding so I am not willing to listen" kinda debates. The truth of the matter is that the other major players are all OO. If you go looking for a serious job, they want a basic understanding of OO at the *very least*. To be blunt, this war has already been fought, and procedural programming lost.
# Posted By Brian Rinaldi | 10/8/07 10:51 AM
I manage a large group of web programmers and wish I could say that all of them know or understand the concepts of OO and a good framework.

When it comes to the times of one of my developers needing to back up another (due to scheduled vacations or other reasons), I can truly say that it’s very tough for them to simply jump-in at times and take over. However, for my folks that provide web application solutions using frameworks like Mach-II, Fusebox, and Model-Glue, it’s much easier for other OO-skilled programmers to jump right in and provide support where needed – all while being very transparent to the customer (important for a manager).

I also find it very easy for developers to write procedural spaghetti code without using a good software design and framework. I know many other companies that have these same challenges and managers are looking for OO skilled folks to join their teams.

I am also hoping that the authors of CF books start sponsoring good concepts of OO. Like Kyle posted, I too have rarely seen object orientation promoted in the early phases of learning ColdFusion.
# Posted By Bill | 10/8/07 12:40 PM