G
Gwen
what are d advantage and disadvantage of the registry
versus having individual ".ini" files?
versus having individual ".ini" files?
Gwen said:what are d advantage and disadvantage of the registry
versus having individual ".ini" files?
Gwen said:what are d advantage and disadvantage of the registry
versus having individual ".ini" files?
In said:Registry:
* Centralised backup of all settings by the user (through
backup) * Faster access (Registry is cached at all times)
* Per-value, per-key security
* More acesible patching of eventual errors (through a .reg
file) * User-transparent. If you want a "hidden" setting, you
don't use a file.
Especially .INI
* Data format-proof. Registry can hold anything (just keep the
size down
if you write in MY registry)
INI files:
* Survives re-installation of the OS
* Allows complete removal of settings, porting, network
distribution * Simpler layout and debugging (anyone can edit and
delete an INI with no
danger of nuking other programs)
* Ability to uninstall ny (oh-so-frequent) deletion of the
folder. * developed-for-ini-files software is easy to port.
Linux, for example,
has no registry but it does support INI and configuration files
(that are, basically, ini files with different syntax)
* debugging is easier, as INI files can be easyly diff 'd (FC
/L)
More should be said, but basically that's the idea. If you build
for
stability, you should have an ini file. A recovery tool with
registry settings isn't the best option. If you build for speed,
registry is better.
Also, storing in a file keeps the load of the registry. As
stated, it's
cached and more you store, more RAM you hog. OTOH, not everything
can be stored into an INI, like raw data and multi-line text, not
to mention formatted text (unless you convert it).
As a developer, I go for the registry for simple settings I can
nuke at
any time (window coordinates, options, etc) and keep INI files for
critical things, like addon locations and other stuff that might
be needed after a crash. A dual solution might work for the best.
Sometimes, however, you have no choice. Like when building a
web-updating
tool, it needs to read the installation path from the registry, an
INI file is useless. Or a browser object, shell location, etc
which needs to access a path from anywhere. In short, it's your
call. There is no such thing as incompatibility, an INI file will
never change or outdate because you write it and it's -as far as
the system is concerned- proprietary.