I actually do not see cfinclude inside of a CFC as a bad thing.
1) You can either create a whole group of common methods you need for each of your CFCs and copy and paste them in each one. 2) You can cfinclude them into your CFC, so you update once and it will apply everywhere. 3) You could write a base object(CFC) that each of CFCs inherit to get the same functionality. Each way will work to get the methods you want exposed for a given CFC. I have used the cfinclude as a way to incorporate dependency objects through setter injection for methods that needs certain common methods. If all of a group of CFCs need the methods, I would suggest a base class over cfinclude. If it is case by case, cfinclude works just fine. Perhaps someone may have some sort of quantitative measure to see if one emthod over another has a performance benefit, but I suspect it may be negligible if the object is kept in a persistent scope. Teddy On 1/31/07, Rose, Mitch <[EMAIL PROTECTED]> wrote:
Hi Folks, Syntactically, at least, I think I understand the differences, and I'm guessing most of you would agree that using cfinclude within a cfc 'smells bad'. But I'm unclear as to why one would choose one approach over another. Could some smart folks with experience here could speak to the pros and cons of each, and how usage might differ? Thanks -m You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org
-- Teddy R. Payne G-Talk: [EMAIL PROTECTED] Adobe Certified ColdFusion MX 7 Developer Atlanta ColdFusion User Group (ACFUG) Atlanta Flash & Flex User Group (AFFUG) You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org