Well... I see the point (perspective at least). If but like the gas scenario
in last post. The lines are never perfectly ignorant... or your code would
have no idea what method to call and what it returns. So like when you
change from English to Metric... there is an issue. (Or were you saying
there should be two methods rather than two attributes?)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Barney Boisvert
Sent: Monday, August 29, 2005 4:24 PM
To: [email protected]
Subject: Re: [CFCDev] When to use the THIS scope for a ColdFusion Component?

Interfaces dictate behaviour, and state is not a behaviour.  The
ability to change and/or recall state, however, is a behaviour.  So
that's the reason.

But I think what you're getting at is something slightly different. 
What an object stores is part of it's implementation.  You, as the
user of an object, should have no idea (nor any reason to care) what
information is intrinsic to an object.

Age is a perfect example, because if you call user.getAge(), how often
do you think you're going to get the value of an instance variable
returned?  Probably not very often, because the age will be computed
from a dateOfBirth field.  So you don't care about the internal data,
you only care that you can retrieve the user's age.  I.e. the object
has a behaviour that will give you the info you want, not that you
know what state the object has.

cheers,
barneyb

On 8/29/05, John Farrar <[EMAIL PROTECTED]> wrote:
> OK... maybe this would help me. If you have protected attributes, then why
> is an attribute not an interface but a method is? (And if you could
control
> the input type and output type of a getter/setter for an attribute, would
it
> meet the standard of a correct interface then?)
> 
> John

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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 words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to