On Nov 24, 2003, at 6:53 AM, Raymond Camden wrote:
People use the Manager IS-A Employee concept, when in reality, it is instead
a role. Ie, Bob is an Employee who has a Manager role. He is not a TYPE OF
Employee, he is simply an Employee with a Manager role. Jane is an Employee
with no role, or maybe just Grunt role.

Correct. If you read about archetypes in OO design, you'll see four of them:
- moment-interval (time/transaction-related)
- role
- description
- party, place, thing
The key here is the separation of role from party (person or organization) because a party may have multiple roles at a time or over time. Consider what happens when someone is promoted: if you use inheritance to model them (manager is-a user) then you have to change the object's type in order to promote them. That should raise a red flag. If you separate the role out, it should be clear that the person remains the same but their role changes, i.e., promotion is just a matter of changing their 'role' attribute.


Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

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