commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Gaspar" <paulo.gas...@krankikom.de>
Subject RE: [Configuration] Proposals ...
Date Mon, 17 Jun 2002 00:14:07 GMT
Stéphane,


Maybe you should make an study on Avalon's stuff and pay a bit more
attention to what it really does:

> ...
> So, technically, the second difference raises : I don't want to use the
> XML file as the proper configuration, as in Avalon...
> ...
> With this configuration file you would
> then be able to read (AND WRITE, which is another difference)
> configuration files for your applications, which may be every
> application (in my case, Samba, FreeSwan, Shorewall, my Turbine
> app, etc.).
> ...

For different storage mediums/formats you would just need to write new
Configuration Builders and Serializers:
 - Builders read a Configuration from "somewhere";
 - Serializers WRITE a Configuration to "somewhere",


> The XML descriptor is meant to be constant (well, adaptable when
> needed), so that it can be parsed easily and confronted to a DTD and/or
> a schema. Avalon configurations can't be natively confronted to a DTD as
> the structure is very free and one can add whatever field he wants.

Actually, the structure is (almost) whatever you want. There is no reason
why you shouln't be able to validate the source XML for a configuration
using a DTD.


Have fun,
Paulo Gaspar


> -----Original Message-----
> From: Stéphane MOR [mailto:stephane_listes@yahoo.fr]
> Sent: Sunday, June 16, 2002 5:53 AM
> To: Jakarta Commons Developers List
> Subject: Re: [Configuration] Proposals ...
>
>
> >
> >
> >Please note that Apache Avalon already has a very nice and flexible
> >Configuration object.  The interface for it is located here:
> >
> >http://cvs.apache.org/viewcvs/jakarta-avalon/src/java/org/apache/avalon/
> >framework/configuration/Configuration.java?rev=HEAD&content-type=text/vn
> >d.viewcvs-markup
> >
> >
> >Could you let me know how your's differs?
> >
> Hi Berin,
>
> I looked at Avalon's Configuration package a while ago when I used Avalon.
> It is nice, but I stopped using it when I stopped using Avalon (new
> projects didn't need/fit into it).
>
> The main difference is in the goal : I need to be able to use legacy
> configuration files, used by other applications,
> as well as properties files. This includes being able to treat files
> such as :
>
> ------------------- samples -----------------
> #FIELD1    FIELD2    FIELD3
> leonard        cohen        singer
> luc                besson      director
>
> or :
>
> section1:
>     test=value
>     foo=bar
>
> section2: ...
> ------------------------------------------------
>
> So, technically, the second difference raises : I don't want to use the
> XML file as the proper configuration, as in Avalon
> (tell me if I'm wrong), such as :
>
> ------------------------------------
> <fields>
>   <fieldA>value1</fieldA>
>   <foo>bar</foo>
> </fields>
> ------------------------------------
>
> but I want to build an XML descriptor of a configuration file. (A sort
> of configuration's configuration ...) more like the
> commons Configuration package. With this configuration file you would
> then be able to read (AND WRITE, which is another difference)
> configuration files for your applications, which may be every
> application (in my case, Samba, FreeSwan, Shorewall, my Turbine
> app, etc.).
>
> The XML descriptor is meant to be constant (well, adaptable when
> needed), so that it can be parsed easily and confronted to a DTD and/or
> a schema. Avalon configurations can't be natively confronted to a DTD as
> the structure is very free and one can add whatever field he wants.
>
> I hope that those short explanations shed some light ...
>
> I know that I have some very specific needs, tied to my applications'
> goals. This is why I asked if there is an actual interest in such
> a package.
> Though, many times I feel that I cross other projects needs (commons'
> Configuration at least), so I wondered if that could be thought of with
> the people working on these projects, and maybe mixed.
>
> I saw that the commons Configuration package was attempting to build a
> framework to deal with XML config files. As using XML config
> files is a growing practice (though I never encountered any in the
> applications config files I has to manage), I think that such a framework
> could help dealing with them.
>
> >I would like to reduce duplication amicably if at all possible.
> >
> Agreed at 200% !
> This was actually the whole point of my message !!
>
> Cheers,
> Stéphane
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:commons-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message