Re: Why not XML based configurationfiles?

From: Nick Landsberg (SPAMhukolauTRAP_at_SPAMworldnetTRAP.att.net)
Date: 07/04/04


Date: Sun, 04 Jul 2004 03:18:26 GMT

Andy Fraser wrote:

I tend to agree with Andy and disagree with Mats for reasons
listed below as we go.

> In comp.os.linux.misc, Mats uttered these immortal words:
>
> Just a few more points...
>
>
>>If this is done correctly, it won't just benefit the users/administrators,

"If" is a very small word which has many implications and
many traps and pitfalls.

>
>
> Why "users/administrators"? They are very different in Linuxland. On a home
> system used by one person the user is also the admin but they are different
> roles. In a company they would be different people of course.
>
>
>>it would benefit the programmers too,
>
>
> How exactly?
>
>
>>to put all info in one place,
>
>
> Now I'm sure you're after a registry type thing for Linux. Yay or nay?

Ahhh... the evil empire's "registry."

"One ring to rule them all, one ring to find them.
One ring to bring them all and in the shadows bind them."

For reasons too numerous to mention, experiences
with the MicroShaft registry IMO have proven beyond
a shadow of a doubt this is *"A BAD IDEA!"*

>
>
>>easy
>>to browse for the user/admin.
>
>
> There's that "user/admin" thing again. A user shouldn't ever need to read
> files in /etc, only his or her copies for their own customisations to
> programs that they're allowed to run for which there's usually a
> "configure", "preferences" or "options" dialog just like in Windows (GUI
> apps assumed here).

If a user screws up his/her own version of a particular APP's
config file, they lose use of that APP. If an admin screws up
the global config file for an APP, *all* users may lose use of
that app. If an admin screws up a GLOBAL config file for all apps
(or if some ill-designed GUI/CLI app by some newbie screws up the global
config file for all apps), *everyone* is SOL. No thanks,
I still prefer a config file per app.

I even have reservations about putting all the config files
in /etc, because I would like to be able to uninstall and
eradicate all traces of an app just by doing something
like stepping into the app's directory and removing everything
and then removing the app out of /usr/local/bin or wherever it lives.

Now, I can definitely sympathize with Mat's complaint that
every app seems to have their own idea of how a config
file should be laid out. And there do not seem to be
any strictly-adhered-to naming conventions for the config
files. That *is* a PITA. XML (for better of for worse)
is becoming a de-facto standard for this kind of stuff
and people will want to use it as the "path of least resistance."
But, does that mean that *every* app must include an
XML parser? Just to read the startup parameters?
Even a stripped down parser? Talk about software bloat!

At the risk of also going far afield from the original
intent of the posting, I could argue that a well-designed
app should not need a complex configuration file.
If it's more than a screenful of parameters in vim or emacs,
they've overcomplicated the problem, overcomplicated
the solution, or both. Given the fact that there *are*
complex configuration files out there, that argument
is moot in this context, however.

>
>
>>Not having to answer a lot of stupid emails
>>with basic questions and frustated admins and write endless updated FAQ's.
>
>
> You'll never, ever eliminate that no matter what you do. ;-)
>
>
>>>Generally Linux/Unix admins are of a higher calibre than
>>>Windows admins. GUI config tools generating XML files could well change
>>>that.
>>
>>It's not a question of Windoze or XML-files, it's a question of doing what
>>computers IMHO was invented to do, make life technically easier.
>
>
> They make things easier when they're configured correctly. That's the admins
> job. If the setting is a company then it's down to the company admins to
> make sure things are working before the computer hits the users desk so the
> user can get on with things. If the setting is your home then you have to
> be the admin before you can be the user. I may be going OT here. It's hard
> to tell when I'm still not 100% sure what you're getting at.
>

NPL

-- 
"It is impossible to make anything foolproof
because fools are so ingenious"
  - A. Bloch


Relevant Pages

  • Re: CLI-kiddies/advocates ?
    ... On Sun, 27 Nov 2005 20:01:55 GMT, Aragorn staggered into the Black Sun ... all the 4.n Xs are supposed to use the same config file format. ... having may be due to compatability libraries, or if the app is really ... post the error messages from the problem app's startup. ...
    (comp.os.linux.misc)
  • Re: WSE2.0 Security Exception ?
    ... that is simply trying to read its app config file. ... invalid, Rename will be used as AfterCopyEvent. ... >>executable with full trust on a Win2k box without error. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • RE: Application error in event log
    ... image is compiled by the .NET the first time that you load the assembly, ... This means that the image compilation failed. ... can not alter at runtime the config file (upon there are functions like ... At some point I got one of our network admins to run the app ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: strang, isnt it?
    ... "An unhandled exception has occured in your application..... ... > denote you want the app to start on start-up (so I can repro the problem. ... > There's more than one registry setting that can be used like this). ... >> the config file as a parameter? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: XP & W2K server User rights need help
    ... before did not install the apps as admin. ... >behaved app. ... >> server non of the users had accounts only the computers ...
    (microsoft.public.windowsxp.security_admin)