IMHO, the is a, has logic can easily be corrupted, just by carefully naming the cfcs...
machine.cfc is a object.cfc a machine is an object..... but in this case, the object.cfc is actually codeutils.cfc, so i agree with Sean, machine should not inherit codeutils. The way I do it, I have a cfc called "common", which then goes through a directory below itself, also called common, and decorates itself with all the cfcs it finds, e.g. I have math, string, script.... Then, if a cfc needs access to these functions, you pass it into the constructor, and it can now reference instance.common.string.split() If you are using inheritance, (fatal logic error: why would a "vehicle" have a split() function?) then I presume you would just call split(), so if a future CF version has a split() function, you are in trouble.... Kerry -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Sean Corfield Sent: 23 November 2004 05:34 To: [EMAIL PROTECTED] Subject: Re: AW: AW: [CFCDev] Validation On Mon, 22 Nov 2004 15:30:20 -0800, Ben Curtis <[EMAIL PROTECTED]> wrote: > Would one of your exceptions be the root cfc that cfcs inherit if we > don't specify an extends value? You mean like WEB-INF/cftags/component.cfc that all CFCs already inherit from? And it's empty. > machine.cfc is a > cfc.cfc No, a machine is not a CFC so that relationship doesn't match truck is-a machine. > Perhaps utilities, like some sort of extension to the language > (e.g., ListWithNullsToArray, which will use ListToArray to convert No, that's what function libraries are for. Besides, many many CFCs do not use that function so it is not appropriate to make it compulsory for all CFCs. > I've typically seen such Utility code bundled up on it's own, and not > inherited. That's the right way to do it - as a library, not as a base class. -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 1 invite "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- 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 [EMAIL PROTECTED] ---------------------------------------------------------- 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 [EMAIL PROTECTED]
