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.

#1 by Raymond Camden on 12/4/06 - 9:32 AM
#2 by Dan on 12/4/06 - 9:40 AM
I am with you but you have a very good understand what OO consists of. I think I am just trying to inform others that that term gets thrown around way to much just because someone has written a cfc!
#3 by Raymond Camden on 12/4/06 - 9:45 AM
Personally I'm a huge believer in KISS. I think a lot of folks get scared off from CFCs due to the OO talk around it. When I talk about CFCs, I have a VERY strong bullet point in there saying that CFCs are NOT OO. Keep on preaching, brother!
#4 by Dan on 12/4/06 - 9:47 AM
#5 by Ken on 12/4/06 - 11:28 AM
#6 by Peter Bell on 12/4/06 - 2:54 PM
I think OOP is a journey. For instance, I'd argue that most MG and M2 apps don't have an OO controller. Sure they use CFCs, but the events at a controller level aren't inherently associated to domain objects. For me a more OO approach would be to pass object name and event name so if you want to list users, it is index.cfm?object=list&event=list (with an optional action modifier to capture the fact that there are a lot of different possible object lists so you have to say which one).
Additional benefits are ability to inherit from base controller for quicker coding and yet the ability to overload the list method for articles if they need a fundamentally different controller method than listing for products or other business objects.
Just playing with this, but seems to be working really well for me so far. NOT designed for complex workflows - they need a continuation server style workflow domain object and multiple content areas requires something like a pseudo-page controller, but for single content area page calls with a low level of statefulness requirements, seems to be an approach.
Anyone else doing this?
http://www.pbell.com/index.cfm/2006/12/2/Object-Co...
Sorry to take a tiny area of what you were talking about and focus on it, but I think it might be time to ask "how OO ARE M2 and MG"!
#7 by Peter Bell on 12/4/06 - 2:55 PM
Also not saying non-OO is wrong - as always, depends on use cases.
#8 by todd sharp on 12/11/06 - 9:01 AM
#9 by Peter Bell on 12/11/06 - 9:18 AM
Well, of course, CFC's can be OO - they're a necessary but not sufficient condition. As for the hype surrounding OO, there is a reason for it, and honestly these days I wouldn't really call it a hype - it has been out there too long. It is the default way to develop most classes of web applications and the reason for that is that it makes larger projects more maintainable. As with any technique, if you don't need it for your use case that is fine, but it's a pretty useful set of tools to have in your toolkit if you're developing and maintaining larger projects.
#10 by Sana on 1/29/08 - 7:11 PM
Your are doing awesome job.
"The Ext team is happy to announce the release of version 2.0.1 of Ext JS. This is a maintenance release that fixes several issues with the 2.0 release. All Ext 2.0 users are encouraged to upgrade at your earliest convenience."
Thanks
Sana
#11 by Sana on 1/29/08 - 7:20 PM
@"#6 Posted By: Peter Bell Posted On: 12/4/06 2:54 PM"
I can see where you coming from, seems like that you are behind the ColdBox core :)
I realy like the implementation of cfext!! neat and clean syntax to do stuff.
Secondly if developer is more than happy to build something within own mental set(that is really important). CFCs are not every thing in CF; We should consider other features as well.
Sana
#12 by yakoob ahmad on 4/18/09 - 10:26 AM
- Code your base to an Interface.
- extend your generic model class off of your base.
- extend your specific model class off your generic class.
- use coldspring to link your DAO to your base with