Re: *Parameterizable*

Ryan Hoegg <[email protected]>
Newsgroups gmane.comp.java.jcontainer.interest
Message-ID <[email protected]>
Mauro Talevi wrote:

> Mircea Toma wrote:
>
>> Mauro Talevi wrote:
>>
>>> I thought of Parameters as something that the container set and 
>>> handled,
>>> while Configurable as something more user oriented.
>>
>>
>> Naah, it's the same thing.
>>
>>> But that can be useful, as you say, so what's wrong with leaving it 
>>> in the framework and letting the user decide what he finds more 
>>> appropriate?
>>
>>
>> I think a good API should be very clear about the contracts it enforces.
>> The user will use it in the wrong way if it's possible.
>>
>>> They can actually be used together, so not necessarily mutually 
>>> exclusive.
>>
>>
>> "Configurable" is concerned just to configure an object instance. 
>> "Parameterize" duplicates this concern. You don't have a violation of 
>> SoC here, but a duplication.
>>
>>> A conversion tool sounds like a good idea, we could add it to 
>>> http://spice.sf.net/alchemist
>>
>>
>> Good idea. I would love to have a tool that will transform a 
>> Configuration object to Parameters, Properties, and Map objects.
>
>
> But where would Parameters be defined then?
> In order to convert to it must be defined as object somewhere,
> and the only place I can thing of is the api.
>
> Are you proposing to keep Parameters and chuck the interface only?
>
I might like to see the Parameterizable interface disappear, and a 
ParametersConfiguration class be created that allowed me to create a 
Configuration in a more Map or Properties-esque way.  I'm not sure I 
understand the reverse use case, which is to make a Parameters out of a 
Configuration?  Is this for convenience in the configure() method?

--
Ryan Hoegg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.