[thelist] CF: Coldfusion doesn't do OOP!
Frank Marion
lists at frankmarion.com
Thu Aug 12 10:33:24 CDT 2010
I've run into an argument with a potential employer who exclaimed
(sneered?) "You can't do OOP in CF, only in Java!".
I know it's not true, and aside from the tricky proposition of
correcting someone gracefully, and not being fluent in CF-OOP I wasn't
able to give a really satisfying comeback ("Does so!" isn't
compelling). I know that the OOP in CF is somewhat imperfect, but I
was hoping that someone could offer me a solid response to the
assertion. When I look up OOP in wikipedia, I can see the following.
The fundamental concepts in OOP are
Classes: We have those, we just call them components.
Instance: Anytime we cfinvoke or CreateObject("component"
"myComponent") we are instantiating a class.
Methods: cffunction.
Message passing. Yup, we can invoke one CFC from another.
Inheritance: This is something that I don't think CF does unless
extending a cfc handles this.
Abstraction. Yep. We can hide our methods and feed out only within the
scope we want.
Polymorphism. I don't think so.
Decoupling. Don't know enough to answer well.
I could very much be wrong, but aren't frameworks like ColdSpring
designed to address issues to emulate polymorphism?
Can someone offer a pithy answer that is both graceful and factual?
And if anyone wanted to clarify the above, that might be nice too.
Thanks!
--
Frank Marion
lists [_at_] frankmarion.com
More information about the thelist
mailing list