commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Carlson <joncrl...@yahoo.com>
Subject [Collections] Proxy* classes
Date Mon, 10 Jun 2002 18:40:30 GMT
I'd like to add my two cents on the these classes:
ProxyMap, ProxyListIterator, ProxyIterator.

The use of the term "Proxy" in these classes is very
confusing for those who are familiar with the grandaddy of
pattern definitions books, "Design Patterns" by the "gang
of four".  I would like to suggest that the term
"Decorator" would communicate much more succintly and
clearly the function these classes perform.

Here are their definitions:

Decorator - Attach additional responsibilities to an object
dynamically. Decorators provide a flexible alternative to
subclassing for extended functionality.
http://www-white.media.mit.edu/~tpminka/patterns/Decorator.html

Proxy - Provide a surrogate or placeholder for another
object which cannot be accessed by normal means. 
http://www-white.media.mit.edu/~tpminka/patterns/Proxy.html

At the very least, the javadoc should be updated to say
something like this: 

"Decorates a List with abstract pass-through
behavior.&nbsp;Subclasses should override methods to add
additional decoration behavior."

(see
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html)

My 2 cents :-)  If I've misunderstood the real purpose of
these classes (I haven't looked at the code) then the
javadoc should probably be clarified.

Jonathan



=====
Jonathan Carlson
joncrlsn@users.sf.net
Minneapolis, Minnesota

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message