[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using XML to handle all configuration files

On Sat, Jan 20, 2001 at 05:39:48PM -0300, Nicolás Lichtmaier wrote:
>  If we want any kind of automatic handling of configuration settings, we
> need to modify these files. So we need some kind of trick to parse them,
> modify and rewrite. The current solutions are often substandard, like
> editing with sed, overwriting, generating a new config file each time the
> user runs a configurator.

You're right about the problems with the way people often do things
now, but I think your approach is too ambitious.  By the way, in
addition to the technical problems, I think you may have acceptance
problems if you take the approach of rewriting the entire file.
People will be nervous that one bug will hose their entire
configurations.  At least sed scripts can typically do only
localized damage.

>  And when you have a configurator, you'd like to use the current values as
> defaults, so you end up with many developers implementing their own way to
> parse things.

>  Besides, I don't think there are such many cnfiguration formats.

We'll find out if that's true!

> > In short, there's a place for text-based config files, and a place
> > for abstract data structures, and you should try to let each do what
> > it does well.
>  You lost me. They are all kinds of configuration settings, why would one
> want to handle them diferently? I still think that the XML view of the file
> should include everything.

I mean that a config file is a document.  Like source code, it
should read as a coherent, flowing expression.  This includes use of
comments, ordering, and whitespace.  It's more than the data
structure it represents.


Reply to: