Cross-platform configuration, options, settings, preferences, defaults
- by hippietrail
I'm interested in peoples' views on how best to store preferences and default settings in cross-platform applications.
I primarily work in Perl on *nix and Windows but I'm also interested in the bigger picture.
In the *nix world "dotfiles" (and directories) are very common with system-wide or application default settings generally residing in one path and user-specific settings in the home directory. Such files and dirs begin with a dot "." and are hidden by default from directory listings.
Windows has the registry which also has paths for defaults and per-user overrides.
Certain cross-platforms do it their own way, Firefox uses JavaScript preference files.
Should a cross-platform app use one system across platforms or say dotfiles on *nix and registry on Windows? Does your favourite programming language have a library or module for accessing them in a standard way? Is there an emerging best practice or does everybody roll their own?