Requirements and pre-analysis for a cross desktop configuration infrastructure
Philip Van Hoof
spamfrommailing at freax.org
Mon Mar 21 22:24:01 EET 2005
On Mon, 2005-03-21 at 21:11 +0100, Waldo Bastian wrote:
> > Thats and because it's possible the configuration options should be
> > localisable (UTF-16) is why XML is a suitable solution for the default
> > backend.
>
> One line per record will work just fine if you use utf8 and escape newlines.
>
Thats, of course, true. However. Many applications misuse the
configuration system by putting (for example) XML in the values. Whereas
that means lots of quoting and/or CDATA-tags in an XML-backend writer,
it does happen automatically and for example libxml-2 will do that just
fine. A one-line per record format will result in hugely long lines.
Therefor they wont be really readable any longer.
And by that it misses the whole point of using both a source control
system and one-line per record text-files. The source control system
will spew diffs that will have silly long lines. Your text-editor will
need a 80-head X11 display to show the indented-but-on-one-line XML.
And finally, I can imagine situations where UTF-8 isn't suitable. But
then again, many source control systems can perfectly handle Unicode. So
that is perhaps a non-issue.
However. How the system itself stores the information internally, isn't
relevant here. This is about how the system will spew backups and from
what file-format it can merge/restore configuration data. How the system
internally handles the configuration data shouldn't be important for
system integrators (who are going to integrate it with for example a
source control system). They shouldn't be using it. Simply because that
backend is to be very replaceable. PostgreSQL, IMAP, MySQL, XML,
ini-files, GConf XML, etcetera. It shouldn't matter (if, of course, a
backend is written for it). And because they can't trust the state of
that data at any specific moment in time, AND because it's insanely
difficult to make it possible to let them securely write to that
internally used data and/or to keep such an implementation platform
independent.
File alternation monitors like Gamin are cool, an many respect to the
people who maintain it, but I don't want it being used in a
configuration environment.
--
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.freax.be, http://www.freax.eu.org
More information about the xdg
mailing list