It breaks encapsulation. No OO language that I am aware of allows for including external code in the manner that CF does with cfinclude within CFC's. I would say that the only reason one would cfinclude code in a CFC is if the same code was being reused in more than one CFC. And if that is the case, it's probably an indicator that the object model should be reconsidered. That's just my opinion, of course.
Regards, Brian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin S. Rogers Sent: Tuesday, July 06, 2004 5:49 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Serialization of CFCs > > The bottom line is basically, don't use cfinclude > > within CFCs. > > It would be bad OO practice anyway. How so? Reusing code via cfinclude wouldn't really fit into the OO paradigm. However, simply including a function body doesn't seem to have anything to do with OO -- good, bad or otherwise. Regardless, there are apparently some bugs in regards to variable scoping, so using cfinclude from within a cffunction should be avoided. -ben ---------------------------------------------------------- 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] ---------------------------------------------------------- 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]
