I wrote this on my blog about different ways to deploy cfc's in a coldfusion app. Part of what it covers is hard coding typing and extends, you may find it useful:
http://www.compoundtheory.com/?action="">However, to point, there is no 'real' way of making it more dynamic, as it currenty stands,
This
was raised a while ago
I
believe it can not be dynamic because the "extends" value is resolved at compile
time, not runtime so you cant have a dynamic "extends" value. This is the
same as with the CFIMPORT tag. the lib value can not be
dynamic
Mark
Mandel did go into how you can
Thanks guys,
We mainly use it for business rules that our clients request so that we
totally seperate the logic of what they want and the core. But when it
comes time to building each environment i.e Production, Test, Train it
because a real pain as you have to manually change each extended
We use CFC's heavily in our application. Because they rock
good to see, Jer..more power to you
can I throw in a quick thought?
if you're wanting to make extends dynamic, would you consider a
mix-in approach where you're decorating the CFC with functionality
of another, as opposed to straight
Hey Jeremy,
There is a core OO design rule that says favour composition over
inheritance. What that means in CFCs is that you should favour:
cfcomponent
cfset rules = createObject(component,
com.jeremy.app.rules.SomeRules)
cffunction name=applyRules
...