commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [clazz] Accessing the properties
Date Tue, 29 Oct 2002 23:34:09 GMT
From: "Dmitri Plotnikov" <>
> From: "Stephen Colebourne" <>
> > I think the key to all APIs like this is to re-use what Java offers, and
> > thats the collections API in this case.
> It would indeed be very appealing to re-use the Java collections
> However, I'll have to be honest with you. I must be old-fashioned, but the
> allocation of all these wrappers bothers me.  I have noticed that wrappers
> have become quite fashionable lately (e.g. WrapDynaBean), but I am still
> convinced that allocating all these stateless objects is worth the literal
> reuse of standard interfaces.
> Also, I am not convinced that we need interfaces as wide as those of
> Collections.  The implementation of those APIs can be quite an effort,
> especially in the case where the target object is a Java bean, not a
> DynaBean.  We then have to map all these APIs to some methods on the bean.

I'm not opposed to adding some methods onto the main object to bypass the
need to create the wrapper. Thus a get method would be on the main object
for example. However, I find that once you get into the depths of defining
an add/set/put/remove etc. method, then you should in fact just be exposing
the Map/List. Part of the effort of [clazz] will be implementing suitable
Maps/Lists. This may involve adding to [collections].


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message