Lately people on this list have thrown around the word "coupling" a
lot. I thought I had an understanding of what coupling is but now I'm
not so sure.
Can someone tell me which of these three CFCs is coupled to Thingy? Is
one more coupled than another?
<cfcomponent name="ExampleA">
<cffunction name="init">
<cfargument name="thingy" type="com.useful.Thingy">
<cfset variables.thingy= arguments.thingy>
</cffunction>
<cffunction name="doSomething">
<cfreturn variables.thingy.doSomething()>
</cffunction>
</cfcomponent>
<cfcomponent name="ExampleB">
<cffunction name="doSomething">
<cfargument name="thingy" type="com.useful.Thingy">
<cfreturn arguments.thingy.doSomething()>
</cffunction>
</cfcomponent>
<cfcomponent name="ExampleC">
<cffunction name="init">
<cfargument name="thirdParty" type="com.useful.ThingyHolder">
<cfset variables.thirdParty= arguments.registry>
</cffunction>
<cffunction name="doSomething">
<cfreturn thirdParty.getThingy().doSomething()>
</cffunction>
</cfcomponent>
--
Patrick McElhaney
704.560.9117
http://pmcelhaney.blogspot.com
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]