Alpino, Justin wrote, On 3/21/2007 1:21 PM:
Hi Robert,

I think there are pros and cons for using that approach:

Pros
- smaller components
- less code to maintain
- more flexible

Cons
- too ambiguous (you don't know what the component holds just by looking
at it)
- increased coupling between objects (calling objects must know the
names of internal data structures)

I disagree with this, as although you don't need to know the actual name of the variable in the other method, you might as well. Who is going to make getAddress return the person's name?
- forces order of calling the setter before getter (when requested
arrays are not previously defined. will throw an exception rather than
something expected like an empty array)

The generic approach could also check that the variable is defined, and then define it. (Of course, there is no check that the variable actual /should/ exist in this way, unless you guarantee that anything valid will be defined before or in the init method.)





You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

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

Reply via email to