Skip navigation.

The Case for Gconf

FreeDesktop.org
FreeDesktop.org

Dr. Janne Morén is explaining the problem of the .dot files and the solution found through GConf and the gconf-tools.

Re: XML malady

XML is text markup.
Yes.
It is not adequate for config files.
No.
It makes them unnecessarily bloated, hierarchical, difficult to read, edit and validate.
I don't necessarily disagree about "bloated", though frankly it's hard to begrudge a few bytes here and there if it makes life easier. As for unnecessarily hierarchical, it does add, perhaps, one level of hierarchy over what your app needs. Still fair criticism.
I completely disagree, though, about "difficult to read, edit, and validate." In my opinion, XML makes config files much easier to read, edit, and validate, by making it completely unambiguous what constitutes the beginning and end of a record, and how text is escaped and encoded and such. That may not mean much if you are editing by hand, but even with traditional conf or dot files there are times when you would like to edit them programatically. Using an xml-based format makes this process much less error-prone, in my experience.
IMO, a DBM based solution would be much worse, because you are then storing data in binary files, from which it is much harder to recover information if they become corrupted. This is one of the big complaints with the Windows registry, and certainly not something that GConf should be trying to emulate.