> I had no idea my innocent little best practices document would > generate SO MUCH discussion ;)
Well, at least from me, thanks for starting the discussion. I've learned some stuff, had some opinions validated, and changed my mind on a couple things that I've designed recently. Cheers, barneyb ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nathan Dintenfass Sent: Tuesday, March 16, 2004 2:31 PM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] OUTPUT="false", WAS: RFC, CFC Best Practices I guess for me it boils down to the fact that there is no benefit to outputting directly inside a CFC method, yet there are lots of benefits to not doing it. I believe it was Barney who pointed out on this thread that separating logic from presentation is a "good thing" -- plus, even if you have a CFC designed for display it still doesn't address my very simple and common case of wanting to build your page output via a series of string concatenations inside CFSCRIPT (for instance, maybe you want to generate static HTML pages or just pull together different page elements into a single variable) -- if you output directly you wouldn't be able to do that, and, more importantly, the end developer using your CFC now has to be aware of HOW you implemented your methods, which is the classic no-no of encapsulation. More to the point -- what is the BENEFIT of using anything other than OUTPUT="false" really? I had no idea my innocent little best practices document would generate SO MUCH discussion ;) - Nathan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jeffry Houser Sent: Tuesday, March 16, 2004 12:56 PM To: [EMAIL PROTECTED] Subject: Re: [CFCDev] OUTPUT="false", WAS: RFC, CFC Best Practices At 01:22 PM 3/16/2004, you wrote: Jeffry: I'll assume the other posts answered your first question about why init() is good My question was why is using the "psuedo-constructor" bad? As to why OUTPUT="false" is a good thing -- the main reason is that you don't want to break encapsulation. What do you think about CFCs designed for the sole purpose of displaying data? ( And by you, I mean anyone on the list who feels the need to share) -- Jeffry Houser, Web Developer <mailto:[EMAIL PROTECTED]> Aaron Skye, Guitarist / Songwriter <mailto:[EMAIL PROTECTED]> -- AIM: Reboog711 | Phone: 1-203-379-0773 -- My Books: <http://www.instantcoldfusion.com <http://www.instantcoldfusion.com/> > Recording Music: <http://www.fcfstudios.com <http://www.fcfstudios.com/> > Original Energetic Acoustic Rock: <http://www.farcryfly.com <http://www.farcryfly.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]