Re: Table design for application options

From: erk <eric.kaun_at_gmail.com>
Date: 4 Jan 2005 05:02:05 -0800
Message-ID: <1104843725.539463.16560_at_f14g2000cwb.googlegroups.com>


Dawn M. Wolthuis wrote:
> > [example of INI file omitted]
> You are right. There is nothing easier about that.
>
> I haven't seen this standardized other than for Microsoft, however,
and XML
> is a standard (in some ways), but I'll have to agree with you guys
(yup,
> mAsterdam is male and I'm guessing you are too) that the ,ini file is

> clearer. --dawn

Typically in Java I'll either see XML or a .properties file that looks like an INI file. Sometimes the XML is overkill, but not always; the config.xml file for a Weblogic app server or for Struts, at least to me, is preferable to both multiple config files and to the below. And both are preferable to SQL tables - unless it's going to be queried in some meaningful way (more than just getting either all the values or a single property value), it's more cumbersome than needed.

Hey, I actually found a case where I might prefer XML to SQL or relational... although if I were running many application configurations, and needed to run reports comparing and contrasting, SQL tables would be the better way to go. I just haven't seen that.

In these properties files, there's often an implicit hierarchy, like so:

jndi.initial.host=foo
jndi.initial.port=1416
jndi.name.datasource=Blah
jndi.name.someotherservice=Blech

...
messages.errors.badInput=You typed the wrong thing. messages.titles.businessUnit=Consumer Lending ...

etc.

  • erk
Received on Tue Jan 04 2005 - 14:02:05 CET

Original text of this message