Where to put configuration/data files

J

Jay Bloodworth

Is there a nice cross-platform way to figure out the Right (tm) place to
store configuration files and other data?

Jay
 
A

Aahz

Is there a nice cross-platform way to figure out the Right (tm) place to
store configuration files and other data?

For what purpose? Global program config, user config, what?
 
T

Tim Chase

Is there a nice cross-platform way to figure out the Right
For what purpose? Global program config, user config, what?

I've found three main categories of settings like Aahz describes
(of which I've used all in a single application):

global settings:
I usually keep these in the shared data-store (database or
web-site/service). This can include both global application
settings such as the name of the institution running the app, or
certain business-rules; and global user settings such as name,
general preferences, colorschemes, etc.

machine-specific settings:
this relates to things like particular hardware configurations
(path to the CD drive, resource-names/configurations for things
like barcode/mag-stripe scanners, etc), or which server to
connect to. I usually store these in my application directory on
Win32, or in /etc on *nix boxes.

User-specific per-machine settings:
This can include things like preferred window-layout (which may
change depending on screen-size), stored
passwords/authentication, cache-locations,
local document stores, etc.


There's one other odd-ball category I've seen but not used:
portable storage on a USB drive. It sorta crosses these
boundaries being a bit of each (it's USB-drive specific, but can
be moved from machine to machine).


Choose your best storage location by thinking what a user/admin
would want for each setting. Is it a global setting that all
users need? put it in a network store. Is it something that
pertains to a particular machine? store it in either a
machine-global repository or a user-specific repository accordingly.

-tkc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top