Thursday, January 06, 2005

CF and Double-O

CF blogs are a buzz about OO and CF lately:
(Matt Woodward's Blog, Ben Forta's Blog, Mossy Blog, An Architect's View, etc.)

And I think its great! I have often complained that ColdFusion’s biggest asset, as a language, was also its biggest weakness. ColdFusion can be picked up, with very little pain and suffering, by anyone who knows HTML. And that makes it great - unfortunately this easy of use can lead to some seriously bad coding! I have met several CF developers over the last couple of years who never learned any other language, and never took the time to really learn CF, because they didn’t have to. This leads to programmers who don’t know a thing about best practices, proper ways to structure code for easy of maintenance, and worst of all, code with a complete lack of structure.

If you are coming from HTML to CF, normally you can use a page to page, code as you go style. This works and is even a decent strategy for small applications that have a linear workflow. However, once a developer has moved on to more complex applications (eCommerce store, intranet sites, etc) this lack of structure will kill you slowly over time. To me, this is where OO can really make a difference for CF developers. OO forces you to think ahead, to (dare I say it?) plan out your application, before you code! It also makes you learn about frameworks, objects, inheritance, and reusable code. If new CF developers learned OO, I believe it would lead to better CF applications all around. Which is not to say that I think all CF applications need to be OO; in fact, I would dare say that many CF applications would gain little or nothing from the overhead that true OO brings. But learning OO and starting to think in the structured way that is OO can increase any CF developers work.

No comments: