You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ralph Goers <ra...@dslextreme.com> on 2008/11/12 04:51:01 UTC
[Configuration] HierarchicalConfiguration in configuration2
I've noticed that HierarchicalConfiguration isn't part of the
inheritance for the various hierarchical implementations. This seems
rather odd. What base class are applications migrating to configuration2
supposed to convert all their references to? In fact, I'm wondering if
HierarchicalConfiguration shouldn't just be converted to an interface
that AbstractHierarchicalConfiguration implements.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by "ralph.goers @dslextreme.com" <ra...@dslextreme.com>.
I have no problem with using Configuration instead of
HierarchicalConfiguration except that it doesn't contain all the necessary
methods yet.
I guess from what you are telling me is that the branch is kind of half-way
between the 1.x branch and where it is intended to go. That's fine. It just
means one more place I can help out :-)
Ralph
On Thu, Nov 13, 2008 at 1:13 PM, Oliver Heger
<ol...@oliver-heger.de>wrote:
> Ralph Goers schrieb:
>
>> The problem is that in applications using commons config they would like
>> to specify an interface in lots of places. HierarchicalConfiguration would
>> be perfect for that. It should just extend the Configuration interface.
>>
>
> It was discussed that in configuration2 all configurations are
> hierarchical. In this case there would be the single Configuration
> interface, but it would offer the enhanced functionality which is now
> provided by HierarchicalConfiguration.
>
>
>> I'm also a little confused over CombinedConfiguration and ExpressionEngine
>> since two versions of these classes are present. I am assuming that
>> combined/CombinedConfiguration and expr/ExpressionEngine are the correct
>> classes and the others should be removed?
>>
> Yes, that's correct. Currently DefaultExpressionBuilder still uses the old
> classes because not all Configuration implementations supported by this
> class have been converted to the new model.
>
> Oliver
>
>
>
>> Ralph
>>
>> Oliver Heger wrote:
>>
>>> Ralph Goers schrieb:
>>>
>>>> I've noticed that HierarchicalConfiguration isn't part of the
>>>> inheritance for the various hierarchical implementations. This seems rather
>>>> odd. What base class are applications migrating to configuration2 supposed
>>>> to convert all their references to? In fact, I'm wondering if
>>>> HierarchicalConfiguration shouldn't just be converted to an interface that
>>>> AbstractHierarchicalConfiguration implements.
>>>>
>>>> Well, first of all, this branch is really experimental and far from
>>> being stable.
>>>
>>> For configuration2 the intension was to make all configurations
>>> hierarchical. Because of this there does not seem to be much point in
>>> calling a configuration class "HierarchicalConfiguration".
>>>
>>> The HierarchicalConfiguration class exists there for legacy reasons only
>>> because some classes still rely on it. When refactoring is complete it can
>>> be removed. With AbstractHierarchicalConfiguration there is a new
>>> implementation based on the new NodeHandler approach. (Later this class will
>>> probably merge with AbstractConfiguration.) The new counterpart to
>>> HierarchicalConfiguration is called InMemoryConfiguration.
>>>
>>> But, as you certainly see, there is still a lot of work to do, and also
>>> some fundamental decisions are pending. For instance, what should be the
>>> exact content of the Configuration interface? I am still on the opinion that
>>> it would be a good idea to have a low-level ConfigurationSource interface
>>> covering only the basics of property access and a high-level Configuration
>>> interface providing a rich API with many convenience methods.
>>>
>>> Oliver
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Oliver Heger <ol...@oliver-heger.de>.
Ralph Goers schrieb:
>
> On Dec 20, 2008, at 7:32 AM, Oliver Heger wrote:
>>>
>> Just another point: There are other flat configuration implementations
>> that do not extend BaseConfiguration, e.g. the web configurations or
>> DatabaseConfiguration. AbstractFlagConfiguration was intended to serve
>> as a common base class for all of these.
>>
> I noticed that. I wondered why they don't extend BaseConfiguration
> instead. I guess I'm not clear why both are needed.
>
> Ralph
>
This is because of the different ways of storing configuration data.
BaseConfiguration uses a map for storing its properties in memory. Other
flat configurations use different storage mechanisms. For instance,
DatabaseConfiguration directly accesses the database on each property
access, the web configurations access their corresponding context objects.
AbstractFlatConfiguration was intended to implement the common
functionality needed by flat configurations, but without defining a
specific storage mechanism.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Ralph Goers <ra...@dslextreme.com>.
On Dec 20, 2008, at 7:32 AM, Oliver Heger wrote:
>>
> Just another point: There are other flat configuration
> implementations that do not extend BaseConfiguration, e.g. the web
> configurations or DatabaseConfiguration. AbstractFlagConfiguration
> was intended to serve as a common base class for all of these.
>
I noticed that. I wondered why they don't extend BaseConfiguration
instead. I guess I'm not clear why both are needed.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Oliver Heger <ol...@oliver-heger.de>.
Ralph Goers schrieb:
>
> On Dec 15, 2008, at 1:22 PM, Oliver Heger wrote:
>
>> Ralph Goers schrieb:
>>> On Dec 13, 2008, at 12:42 PM, Oliver Heger wrote:
>>>>
>>> I don't think any dummy implementations are needed. If
>>> BaseConfiguration extended AbstractHierarchicalConfiguration instead
>>> of AbstractFlatConfiguration it would need to override createNode to
>>> disallow node creation and register the FlatNodeHandler . Other than
>>> that what else would need to be done?
>> So you mean that AbstractFlatConfiguration is not needed as a base
>> class for non-hierarchical configurations?
>
> Yes, Any code in it that is needed could move to BaseConfiguration.
>>
>>
>> Its main functionality is to provide support for creating the tree of
>> configuration nodes on demand and keep it up-to-date. Derived classes
>> can still operate on their native data structures, e.g. maps.
>>
>> If you extend AbstractHierarchicalConfiguration directly, wouldn't you
>> have to implement the handling of nodes yourself?
>
> I don't think so. The main reason is that a Flat configuration shouldn't
> be able to have any child nodes so all that is needed is making sure
> they can't be created.
>>
>>
>> But anyway, its a while since I deeply looked into these things. If
>> you want to try something out, don't hesitate!
>
> OK. I haven't delved too deeply in this. All I've been doing really is
> working on trunk and then trying to figure out how to port it to the
> branch.
>
> Ralph
>
>
Just another point: There are other flat configuration implementations
that do not extend BaseConfiguration, e.g. the web configurations or
DatabaseConfiguration. AbstractFlagConfiguration was intended to serve
as a common base class for all of these.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Ralph Goers <ra...@dslextreme.com>.
On Dec 15, 2008, at 1:22 PM, Oliver Heger wrote:
> Ralph Goers schrieb:
>> On Dec 13, 2008, at 12:42 PM, Oliver Heger wrote:
>>>
>> I don't think any dummy implementations are needed. If
>> BaseConfiguration extended AbstractHierarchicalConfiguration
>> instead of AbstractFlatConfiguration it would need to override
>> createNode to disallow node creation and register the
>> FlatNodeHandler . Other than that what else would need to be done?
> So you mean that AbstractFlatConfiguration is not needed as a base
> class for non-hierarchical configurations?
Yes, Any code in it that is needed could move to BaseConfiguration.
>
>
> Its main functionality is to provide support for creating the tree
> of configuration nodes on demand and keep it up-to-date. Derived
> classes can still operate on their native data structures, e.g. maps.
>
> If you extend AbstractHierarchicalConfiguration directly, wouldn't
> you have to implement the handling of nodes yourself?
I don't think so. The main reason is that a Flat configuration
shouldn't be able to have any child nodes so all that is needed is
making sure they can't be created.
>
>
> But anyway, its a while since I deeply looked into these things. If
> you want to try something out, don't hesitate!
OK. I haven't delved too deeply in this. All I've been doing really is
working on trunk and then trying to figure out how to port it to the
branch.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Oliver Heger <ol...@oliver-heger.de>.
Ralph Goers schrieb:
>
> On Dec 13, 2008, at 12:42 PM, Oliver Heger wrote:
>
>> Ralph Goers schrieb:
>>>
>>>>
>>> The problem I have is with the interface. Forcing applications to use
>>> AbstractHierarchicalConfiguration as the "base" configuration object
>>> they code to is wrong, IMO. Either they should use the Configuration
>>> interface, which would need to include the hierarchical APIs such as
>>> configurationAt, or they should use HierarchicalConfiguration, which
>>> should be converted to an interface.
>>> If the goal - which I think was a good one - is to make everything be
>>> hierarchical, then Flat is just a special case where no subtrees
>>> exist, i.e. the root of the hierarchy is a leaf node. The only thing
>>> you really need to do in that case is prohibit adding child nodes.
>>> So my recommendation would be to change the Configuration interface
>>> to include the hierarchical methods.
>>> Ralph
>> I fully agree. It was intended to add the methods for hierarchical
>> configurations to the Configuration interface, so that everything is
>> available through this interface.
>>
>> Unfortunately I did not make too much progress in refactoring the
>> configuration2 branch. My idea was to make all configurations
>> hierarchical first (and the flat package was a step into this
>> direction) and then extend the Configuration interface. It would also
>> be possible to do it the other way around; then we would have to add
>> dummy implementations for the new methods to all configurations which
>> are not yet hierarchical.
>>
> I don't think any dummy implementations are needed. If
> BaseConfiguration extended AbstractHierarchicalConfiguration instead of
> AbstractFlatConfiguration it would need to override createNode to
> disallow node creation and register the FlatNodeHandler . Other than
> that what else would need to be done?
>
>
So you mean that AbstractFlatConfiguration is not needed as a base class
for non-hierarchical configurations?
Its main functionality is to provide support for creating the tree of
configuration nodes on demand and keep it up-to-date. Derived classes
can still operate on their native data structures, e.g. maps.
If you extend AbstractHierarchicalConfiguration directly, wouldn't you
have to implement the handling of nodes yourself?
But anyway, its a while since I deeply looked into these things. If you
want to try something out, don't hesitate!
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Ralph Goers <ra...@dslextreme.com>.
On Dec 13, 2008, at 12:42 PM, Oliver Heger wrote:
> Ralph Goers schrieb:
>>
>>>
>> The problem I have is with the interface. Forcing applications to
>> use AbstractHierarchicalConfiguration as the "base" configuration
>> object they code to is wrong, IMO. Either they should use the
>> Configuration interface, which would need to include the
>> hierarchical APIs such as configurationAt, or they should use
>> HierarchicalConfiguration, which should be converted to an interface.
>> If the goal - which I think was a good one - is to make everything
>> be hierarchical, then Flat is just a special case where no subtrees
>> exist, i.e. the root of the hierarchy is a leaf node. The only
>> thing you really need to do in that case is prohibit adding child
>> nodes.
>> So my recommendation would be to change the Configuration interface
>> to include the hierarchical methods.
>> Ralph
> I fully agree. It was intended to add the methods for hierarchical
> configurations to the Configuration interface, so that everything is
> available through this interface.
>
> Unfortunately I did not make too much progress in refactoring the
> configuration2 branch. My idea was to make all configurations
> hierarchical first (and the flat package was a step into this
> direction) and then extend the Configuration interface. It would
> also be possible to do it the other way around; then we would have
> to add dummy implementations for the new methods to all
> configurations which are not yet hierarchical.
>
I don't think any dummy implementations are needed. If
BaseConfiguration extended AbstractHierarchicalConfiguration instead
of AbstractFlatConfiguration it would need to override createNode to
disallow node creation and register the FlatNodeHandler . Other than
that what else would need to be done?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Oliver Heger <ol...@oliver-heger.de>.
Ralph Goers schrieb:
>
> On Dec 13, 2008, at 7:28 AM, Oliver Heger wrote:
>>>
>> There are of course configurations like MapConfiguration that are not
>> hierarchical by nature. The classes in the "flat" package provide a
>> hierarchical view on these classes. The idea is that when a
>> hierarchical node structure is needed, it is constructed on the fly
>> resulting in a root node and all properties stored in the
>> configuration as child nodes. (So there is only a single layer
>> hierarchy.)
>>
>> But this is also experimental. I am not sure whether this is the way
>> to go or whether these configurations should be transformed into true
>> hierarchical configurations as is done by the
>> ConfigurationUtils.convertToHierarchical() method.
>>
> The problem I have is with the interface. Forcing applications to use
> AbstractHierarchicalConfiguration as the "base" configuration object
> they code to is wrong, IMO. Either they should use the Configuration
> interface, which would need to include the hierarchical APIs such as
> configurationAt, or they should use HierarchicalConfiguration, which
> should be converted to an interface.
>
> If the goal - which I think was a good one - is to make everything be
> hierarchical, then Flat is just a special case where no subtrees exist,
> i.e. the root of the hierarchy is a leaf node. The only thing you really
> need to do in that case is prohibit adding child nodes.
>
> So my recommendation would be to change the Configuration interface to
> include the hierarchical methods.
>
> Ralph
>
I fully agree. It was intended to add the methods for hierarchical
configurations to the Configuration interface, so that everything is
available through this interface.
Unfortunately I did not make too much progress in refactoring the
configuration2 branch. My idea was to make all configurations
hierarchical first (and the flat package was a step into this direction)
and then extend the Configuration interface. It would also be possible
to do it the other way around; then we would have to add dummy
implementations for the new methods to all configurations which are not
yet hierarchical.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Ralph Goers <ra...@dslextreme.com>.
On Dec 13, 2008, at 7:28 AM, Oliver Heger wrote:
>>
> There are of course configurations like MapConfiguration that are
> not hierarchical by nature. The classes in the "flat" package
> provide a hierarchical view on these classes. The idea is that when
> a hierarchical node structure is needed, it is constructed on the
> fly resulting in a root node and all properties stored in the
> configuration as child nodes. (So there is only a single layer
> hierarchy.)
>
> But this is also experimental. I am not sure whether this is the way
> to go or whether these configurations should be transformed into
> true hierarchical configurations as is done by the
> ConfigurationUtils.convertToHierarchical() method.
>
The problem I have is with the interface. Forcing applications to use
AbstractHierarchicalConfiguration as the "base" configuration object
they code to is wrong, IMO. Either they should use the Configuration
interface, which would need to include the hierarchical APIs such as
configurationAt, or they should use HierarchicalConfiguration, which
should be converted to an interface.
If the goal - which I think was a good one - is to make everything be
hierarchical, then Flat is just a special case where no subtrees
exist, i.e. the root of the hierarchy is a leaf node. The only thing
you really need to do in that case is prohibit adding child nodes.
So my recommendation would be to change the Configuration interface to
include the hierarchical methods.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Oliver Heger <ol...@oliver-heger.de>.
Ralph Goers schrieb:
>
> On Nov 13, 2008, at 1:13 PM, Oliver Heger wrote:
>
>> Ralph Goers schrieb:
>>> The problem is that in applications using commons config they would
>>> like to specify an interface in lots of places.
>>> HierarchicalConfiguration would be perfect for that. It should just
>>> extend the Configuration interface.
>>
>> It was discussed that in configuration2 all configurations are
>> hierarchical. In this case there would be the single Configuration
>> interface, but it would offer the enhanced functionality which is now
>> provided by HierarchicalConfiguration.
>>
>
> Now I'm really confused. If this is true then why is there a "flat"
> package and why do things like the MapConfiguration extend from it? I'm
> not sure how you intend to resolve this.
>
> Ralph
>
There are of course configurations like MapConfiguration that are not
hierarchical by nature. The classes in the "flat" package provide a
hierarchical view on these classes. The idea is that when a hierarchical
node structure is needed, it is constructed on the fly resulting in a
root node and all properties stored in the configuration as child nodes.
(So there is only a single layer hierarchy.)
But this is also experimental. I am not sure whether this is the way to
go or whether these configurations should be transformed into true
hierarchical configurations as is done by the
ConfigurationUtils.convertToHierarchical() method.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Ralph Goers <ra...@dslextreme.com>.
On Nov 13, 2008, at 1:13 PM, Oliver Heger wrote:
> Ralph Goers schrieb:
>> The problem is that in applications using commons config they would
>> like to specify an interface in lots of places.
>> HierarchicalConfiguration would be perfect for that. It should just
>> extend the Configuration interface.
>
> It was discussed that in configuration2 all configurations are
> hierarchical. In this case there would be the single Configuration
> interface, but it would offer the enhanced functionality which is
> now provided by HierarchicalConfiguration.
>
Now I'm really confused. If this is true then why is there a "flat"
package and why do things like the MapConfiguration extend from it?
I'm not sure how you intend to resolve this.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Oliver Heger <ol...@oliver-heger.de>.
Ralph Goers schrieb:
> The problem is that in applications using commons config they would like
> to specify an interface in lots of places. HierarchicalConfiguration
> would be perfect for that. It should just extend the Configuration
> interface.
It was discussed that in configuration2 all configurations are
hierarchical. In this case there would be the single Configuration
interface, but it would offer the enhanced functionality which is now
provided by HierarchicalConfiguration.
>
> I'm also a little confused over CombinedConfiguration and
> ExpressionEngine since two versions of these classes are present. I am
> assuming that combined/CombinedConfiguration and expr/ExpressionEngine
> are the correct classes and the others should be removed?
Yes, that's correct. Currently DefaultExpressionBuilder still uses the
old classes because not all Configuration implementations supported by
this class have been converted to the new model.
Oliver
>
> Ralph
>
> Oliver Heger wrote:
>> Ralph Goers schrieb:
>>> I've noticed that HierarchicalConfiguration isn't part of the
>>> inheritance for the various hierarchical implementations. This seems
>>> rather odd. What base class are applications migrating to
>>> configuration2 supposed to convert all their references to? In fact,
>>> I'm wondering if HierarchicalConfiguration shouldn't just be
>>> converted to an interface that AbstractHierarchicalConfiguration
>>> implements.
>>>
>> Well, first of all, this branch is really experimental and far from
>> being stable.
>>
>> For configuration2 the intension was to make all configurations
>> hierarchical. Because of this there does not seem to be much point in
>> calling a configuration class "HierarchicalConfiguration".
>>
>> The HierarchicalConfiguration class exists there for legacy reasons
>> only because some classes still rely on it. When refactoring is
>> complete it can be removed. With AbstractHierarchicalConfiguration
>> there is a new implementation based on the new NodeHandler approach.
>> (Later this class will probably merge with AbstractConfiguration.) The
>> new counterpart to HierarchicalConfiguration is called
>> InMemoryConfiguration.
>>
>> But, as you certainly see, there is still a lot of work to do, and
>> also some fundamental decisions are pending. For instance, what should
>> be the exact content of the Configuration interface? I am still on the
>> opinion that it would be a good idea to have a low-level
>> ConfigurationSource interface covering only the basics of property
>> access and a high-level Configuration interface providing a rich API
>> with many convenience methods.
>>
>> Oliver
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Ralph Goers <ra...@dslextreme.com>.
The problem is that in applications using commons config they would like
to specify an interface in lots of places. HierarchicalConfiguration
would be perfect for that. It should just extend the Configuration
interface.
I'm also a little confused over CombinedConfiguration and
ExpressionEngine since two versions of these classes are present. I am
assuming that combined/CombinedConfiguration and expr/ExpressionEngine
are the correct classes and the others should be removed?
Ralph
Oliver Heger wrote:
> Ralph Goers schrieb:
>> I've noticed that HierarchicalConfiguration isn't part of the
>> inheritance for the various hierarchical implementations. This seems
>> rather odd. What base class are applications migrating to
>> configuration2 supposed to convert all their references to? In fact,
>> I'm wondering if HierarchicalConfiguration shouldn't just be
>> converted to an interface that AbstractHierarchicalConfiguration
>> implements.
>>
> Well, first of all, this branch is really experimental and far from
> being stable.
>
> For configuration2 the intension was to make all configurations
> hierarchical. Because of this there does not seem to be much point in
> calling a configuration class "HierarchicalConfiguration".
>
> The HierarchicalConfiguration class exists there for legacy reasons
> only because some classes still rely on it. When refactoring is
> complete it can be removed. With AbstractHierarchicalConfiguration
> there is a new implementation based on the new NodeHandler approach.
> (Later this class will probably merge with AbstractConfiguration.) The
> new counterpart to HierarchicalConfiguration is called
> InMemoryConfiguration.
>
> But, as you certainly see, there is still a lot of work to do, and
> also some fundamental decisions are pending. For instance, what should
> be the exact content of the Configuration interface? I am still on the
> opinion that it would be a good idea to have a low-level
> ConfigurationSource interface covering only the basics of property
> access and a high-level Configuration interface providing a rich API
> with many convenience methods.
>
> Oliver
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [Configuration] HierarchicalConfiguration in configuration2
Posted by Oliver Heger <ol...@oliver-heger.de>.
Ralph Goers schrieb:
> I've noticed that HierarchicalConfiguration isn't part of the
> inheritance for the various hierarchical implementations. This seems
> rather odd. What base class are applications migrating to configuration2
> supposed to convert all their references to? In fact, I'm wondering if
> HierarchicalConfiguration shouldn't just be converted to an interface
> that AbstractHierarchicalConfiguration implements.
>
Well, first of all, this branch is really experimental and far from
being stable.
For configuration2 the intension was to make all configurations
hierarchical. Because of this there does not seem to be much point in
calling a configuration class "HierarchicalConfiguration".
The HierarchicalConfiguration class exists there for legacy reasons only
because some classes still rely on it. When refactoring is complete it
can be removed. With AbstractHierarchicalConfiguration there is a new
implementation based on the new NodeHandler approach. (Later this class
will probably merge with AbstractConfiguration.) The new counterpart to
HierarchicalConfiguration is called InMemoryConfiguration.
But, as you certainly see, there is still a lot of work to do, and also
some fundamental decisions are pending. For instance, what should be the
exact content of the Configuration interface? I am still on the opinion
that it would be a good idea to have a low-level ConfigurationSource
interface covering only the basics of property access and a high-level
Configuration interface providing a rich API with many convenience methods.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org