Berin Loritsch wrote:
> I see nothing wrong about the Parameters package as a general rule, just
> a
> couple questions:
> 
> 1) Do we want to decouple the Parameters interface from the Parameters
> object
>    like we do with Configuration?
> 
> 2) Are we going to explicitly declare Parameterizable and Configurable
> as
>    mutually exclusive?
> 
> As to #1, it would provide consistency and provide a nice way of making
> different implementations of the parameters object.  It would also
> encourage
> us to place the Parameters.fromProperties() and
> Parameters.fromConfiguration()
> methods into a ParameterUtils class.

+0, but we must keep some compatibility with the past.

> I am +1.
> 
> As to #2, I believe that is what we intended to do in the first place.
> The
> problem is that there is no way to programatically enforce it without
> the
> ContainerUtils or some other helper class.  If it is mutually exclusive,
> we have to specify that in the javadocs--and say that if a component
> extends
> both Configurable and Parameterizable the result is undefined.
> 
> Something like the text below:
> 
> "WARNING: The Parameterizable interface is mutually exclusive of the
>  Configurable interface.  If your component extends both of those
>  interfaces, the behavior is undefined.  The container is free to throw
>  an exception and refuse to use your component, or to pass an object
>  in to both methods.  The object may be empty.  In short do not mix
>  these two interfaces in your components."

I'm against making them mutually exclusive:

- users use them together
- there is no reason why they have to be mutually exclusive
- there is no way to enforce it
- there is no way to make users easily understand this

I use Configuration for general config, and Parameters for per-instance 
config, even in the same class, and find it usefull.

-- 
Nicola Ken Barozzi                   [EMAIL PROTECTED]
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to