Object Oriented Programming in ColdFusion
I am curious to know what first comes to mind when you hear the title of this article. The reason I ask is the result of a conversation I was having with a friend of mine. The topic at hand was ColdFusion components. I have been using them ever since they were introduced in v 6.0. I am currently in the middle of trying to learn and adapt some of the OO design patterns being used throughout the community and wanted to get his perspective on a couple things. I want to share a portion of our conversation so you can better understand why this came up.
Dan: Hey do you do any OO development?
Brandon: yea, is there any other way?
Brandon: I use CFC's.
Dan: I have been using CFC's forever now.
Dan: yes but I would not consider using cfcs as OO development, there is much more that defines Object Oriented Programming.
Brandon: Well the problem is the loose definition of object oriented
Brandon: I agree that there has to be some method to the madness just random CFCs wont work
I would not consider myself or Brandon Jedi Masters or anything (Ray!) but I also do not think we are beginners. With that being said I am wondering how many people out there think of CFC's when they hear Object Oriented Programming. I would also be curious to find out if anyone has presented on OO or CFC's and found that beginners relate the two. I am here to tell you that while components help contribute to the OO way of life that CFC’s do not equal Object Oriented Programming. Object oriented programming, or OOP for short has become a computer programming paradigm because of its fundamental concepts and the problems of procedural programming that they solve. A few of the basic concepts of OOP in no particular order are class, object, inheritance, encapsulation, abstraction, and polymorphism. Again the moral of the story is that just because you wrote a cfc one day does not make you an OO programmer.
