commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: Core architecture [was: Commons architecture]
Date Mon, 24 Jun 2002 23:44:32 GMT
From: "Nicola Ken Barozzi" <>
> - I see that there is a need for some more generic interfacts-facades
> for common things like transforming stuff.
> So I'm +1 on a transformation package. Is morphos ok for you? Just give
> it a name and I'll move all my attention to it.

My concern at the moment is that Transformer in [Collections], [Morphos] and
Convertor in [BeanUtils] all do the same task (essentially). I shall have to
look at Morphos again soon.

> - I see that there is also a need for interfaces that define *patterns*.
> Facade, Factory, Command, etc...
> So I'm +1 for a org.apache.commons.patterns package.

This seems to be gaining ground as a place for these interfaces. Bear in
mind each will have an assistant Utils class.

> As for the interfaces that act as markers or general behaviours, I'm -1,
> since their behaviour can be enforced only by a container, ie framework,
> in which they live, such as Avalon.
> Rule of the thumb: if the interface is a noun, ok. If it comes from a
> verb, no, since it requires actions from a container, and that is not
> enforcible here.
> In fact Avalon core interfaces are basically all "XXXable", because the
> container acts on them.

Following this rule would rule out Identifiable (one method
getIdentifier()). Now I can sort of see why you are arguing this, but if you
go that route then what do you do with IdentifiableUtils? IdentifiableUtils
defines methods for getting a unique identifier. Sample implementations are
incrementing number, random number, tomcat session id type number. ID
generation can and should be shared. It just makes sense to me to keep the
interface with the utility class. Note also that the Identifier generators
are of course instances of Factory. Things start to connect.

I think that we actually don't know what would happen if the Xxxable
interfaces were in core. My belief is that they would probably be used in
ways that we wouldn't dream of. Just because its called from a framework at
the moment doesn't mean it has to be called only from that one framework.


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

View raw message