Here's my take on the discussion. I hope it clarifies more than it confuses. :-)

Let's say we have three objects, Moe, Vicky, and Connor. Connor's the
boss. Vicky needs to update the web site. Moe has the information
Vicky needs for the site. Conner's job is to make sure that she gets
that information.

I see three ways to Connor can do his job.

(1) Connor asks Moe for the information and then tells it to Vicky.

(2) Connor tells Vicky to ask Moe for the information.

(3) Connor tells Moe to tell Vicky the information.

Option (1) is horrible. Why should Connor have to handle the
information that means nothing to him? Vicky and Moe should be talking
directly to each other.

Option (2) means Moe doesn't need to know who Vicky is. She's just
another annonymous client asking for information one bit at a time.
Sometimes Moe has to interperet the data before handing it over to
Vicky, but mostly he's just handing it over as is. Moe has to answer
lots of questions, including ones that don't make sense. ("When does
the next shipment of this [discontinued] product arrive"? "What's the
CEO's boss's name"?)

Option (3) gives Moe a little more control. Rather than just handing
out whatever information is asked of him (by whomever), he gives Vicky
the information she needs. He's can also put Connor's original
directive in context and give Vicky more specific direction.

For example, Conner says to Moe: "Give Vicky the employee information
for John Smith." Moe will put all the information on John Smith that's
relavent to Vicky into a file. Then he'll give the file to Vicky and
say, "here, process this employee." If John Smith is the CEO, however,
he'll put a different set of information into a file and hand it to
Vicky, saying, "Here, process this officer."

Moe's the only one who has direct access to the information, and he's
using that to make himself more useful. Instead of interpereting the
information on a field-by-field basis (as getter methods do) he's
looking at whole entitities and making decisions about what to do with
them.

Patrick

--
Patrick McElhaney
704.560.9117
http://pmcelhaney.weblogs.us


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
cfcdev@cfczone.org 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).

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org


Reply via email to