Re: GConf and bonobo-conf
- From: Byron Ellacott <bje apnic net>
- To: gconf-list gnome org
- Subject: Re: GConf and bonobo-conf
- Date: Thu, 22 Feb 2001 14:38:10 +1000 (EST)
On 21 Feb 2001, Miguel de Icaza wrote:
> But in practice people are coding *assuming* that key data will not
> change. All the code in gnome-libs HEAD for instance assumes this --
> I would claim this is not defensive programming and it is buggy -- but
> it shows that people are *assuming* that the content of their keys is
> going to be kept static.
I think it's a fair assumption to say that once your code hits a mostly
stable state, the type and meaning of a config key won't change. It's
certainly not reasonable to say you won't add keys, or possibly stop using
old keys, but changing the meaning of a config item implies a
corresponding design change. The more important problem to deal with is
added config items, and simply adding a new GConf key is far easier than
messing around with whatever sort of structure+metadata you would decide
to use.
Versioning for config files is good for dealing with drastic syntax
changes; it is (almost always) easy to design your application such that
you can supply reasonable defaults for each key, and to open configuration
details when essential nondefaultable keys are missing (my application,
for instance, will display a config dialog if the data files it presents
graphically are not available).
Of course, it may turn out that there is good reason to alter the type of
a config item, but then, if you're not using a structure, you can simply
use a new key name, no fuss, no pain. If you are using a structured type,
and part of it changes, you could be in trouble.
--
bje
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]