I had a long conversation with a developer friend yesterday about this very
topic - Writing output inside a CFC (or UDF)

Personally, I feel it's not bad form to create GUI cfc's.  They don’t
perform any true business logic, just return pagelets or form parts.

How do you feel about that Isaac - AND what do you use for pagelets?
(cfinclude, cfmodule?) 


Matt Knight ► w: 972 361 9943 ► m: 214 213 4016


-----Original Message-----
From: S.Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 9:09 AM
To: [EMAIL PROTECTED]

> In Aug's CF Dev Journal, Ben Forta introduces CFMX 6.1 and mentions 
> that "CFCs can now safely be placed in a variety of scopes" but does 
> not mention what those scopes are.  Does anyone know what 
> modifications have been made to CFCs with the new release of CFMX 6.1?

> Thanks -

> Tom Schreck

Iirc he's just referring to them fixing the page context(?) bug. You can
output content directly from a CFC stored in the application or session
scope.

I'm with Sean Corfield and other OO folks on that one tho -- I don't think
display should be output directly to the page within a function or cfc
method (now that I have a better understanding of what they were talking
about). Not because of any OO principals but just because it breaks the
metaphor of functions. And the default output="true" _should_ have been
false to make the default comparable to CF5 UDF's. It drove me insane the
first time I ran into it trying to figure out why I couldn't get <a
href="#myfunction()#"> to work because it was inserting white space into the
output before the function call, but not with <cfset myvar = myfunction()>
... that's what I mean by breaking the metaphor. You can use writeoutput()
to do the same thing in a CF5 UDF but it has to be explicit and even then I
don't recommend it for the same reason.


s. isaac dealey                972-490-6624

team macromedia volunteer
http://www.macromedia.com/go/team

chief architect, tapestry cms  http://products.turnkey.to

onTap is open source           http://www.turnkey.to/ontap


-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe: 
   Send UNSUBSCRIBE to [EMAIL PROTECTED] To subscribe / unsubscribe:
http://www.dfwcfug.org
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe:
   Send UNSUBSCRIBE to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to