[thelist] CF: Coldfusion doesn't do OOP!

Mark Mandel mark.mandel at gmail.com
Thu Aug 12 16:23:55 CDT 2010


For a quick break down:

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.
>

Of course CFCs can do this.
<cfcomponent extends="com.Foo" > ... </component>

or

component extends="com.Foo" { ... }

Depending on if you are using tag/script style components.


>
> Abstraction. Yep. We can hide our methods and feed out only within the
> scope we want.
>
> Polymorphism. I don't think so.
>

Yes, you can do polymorphism. You can provide it through inheritance,
interfaces and also duck typing.
http://en.wikipedia.org/wiki/Type_polymorphism


> Decoupling. Don't know enough to answer well.
>
Decoupling is just an aspect of OO Analysis and Design. Since we have
classes, abstraction, polymorphism, this kinda comes with the territory.


>
> 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
>
>
>
>
>
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !




-- 
E: mark.mandel at gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

cf.Objective(ANZ) - Nov 18, 19 - Melbourne Australia
http://www.cfobjective.com.au

Hands-on ColdFusion ORM Training
www.ColdFusionOrmTraining.com


More information about the thelist mailing list