A very good point.  Though if you have a need to return complex instance
data directly, there's very likely an underlying design issue that needs to
be resolved.

barneyb

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Matt Liotta
> Sent: Thursday, September 25, 2003 1:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] Top Ten Tips for Developing ColdFusion Components
>
>
> > The 'this' scope is public.  Anyone with a reference to the CFC, has a
> > reference to anything in the 'this' scope.  The 'variables' scope, on
> > the
> > other hand, is private.  No one can access it, except the methods of
> > the
> > CFC.  Both exist for the life of the CFC instance.  Usually you want
> > to put
> > instance data in the 'variables' scope, so it's fully encapsulated by
> > the
> > CFC.
> >
> However, if you provide a way to access data in the variables scope
> with a "getter" then you have provided a reference to that data right
> in the variables scope. In my book, if the data private to an object is
> mutatable then it is not encapsulated.
>
> Matt Liotta
> President & CEO
> Montara Software, Inc.
> http://www.MontaraSoftware.com
> (888) 408-0900 x901
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word '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 word '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