I fully agree on this concept. One of the weaknesses of CFCs is the "this"
scope access is not managed. It should be set so you can read/write, read or
write to it at the CFC designer's discretion. Until this is managed, there
is a risk of code violation. On the other hand... it sure would make coding
much easier to deal with if they would correct this (not bug) shortcoming in
CFCs. I have already submitted a request for that feature to be added to
some future version... we need more of us voicing to MM that this is a need!

:)

John Farrar
SOSensible

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Nathan Dintenfass
Sent: Monday, October 04, 2004 10:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] to use or not to use - instance data

FWIW, I have to insert the obligatory urging to avoid using the THIS 
scope for instance data.  The main reason is that you end up breaking 
encapsulation of your instance data, thus putting a great deal of trust 
into the hands of the CFC consumer.  This can end up biting you later 
when you choose to change implementation assumptions, but code that uses 
your CFC may have operated on your public instance data using your old 
assumptions.  Your end consumer of the CFC might also make bad 
assumptions about your THIS variables, causing unexpected (and hard to 
debug) behaviors in your CFCs.




----------------------------------------------------------
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]

Reply via email to