Matthew Rosewarne on 8 Jan 2008 18:29:43 -0800 |
I'm sure I won't get any friends for saying it, but config files are a terrible interface (the important word!) to configuring systems in many common situations. From the point of view of a developer or someone administering multiple systems, configuration files provide a largely insurmountable challenge. 1. Configuration files are extremely difficult to edit programmatically. Many applications get around this by simply writing "DO NOT EDIT!" somewhere in the file or having an extremely limited syntax. Placing such restrictions on config files negates any benefit from being able to edit them manually. 2. Configuration files are not very granular. This makes it extremely difficult to propagate changes to parts of a configuration without overwriting the whole thing, which is an enormous obstacle to managing multiple machines or editing a configuration programmatically. 3. When a user modifies a configuration file, the program is typically not aware of the changes. While this may be useful in some situations, most of the time this would involve restarting the program and hoping the changes don't cause it to barf. In a high-uptime environment, this is problematic. It also makes it far more difficult to have hooks run when certain values are changed. 4. Text files are slow and unwieldy for applications to read or write. A configuration file must often be parsed in its entirety in order for any of its information to be extracted. Similarly, they usually must be written out fully for any changes to be saved. While it might be possible to get around this with regex magic, it still requires parsing the entire file and is likely to break. 5. Just about every configuration file has a different syntax. Not only does this mean that users must learn all sorts of different syntaxes to manage their systems, but that a different parser program must be written for every individual file. Often this results in a scenario like that of TeX, where there is only one parser implementation capable of fully understanding the contents of a file. There are other issues, but those are the most important ones I can think of off the top of my mind. I'm certainly not going to claim that an approach like the accursed Windows Registry is superior, it's terrible. The best option I can think of would be a flexible configuration _interface_ (by "interface" think "API" rather than "GUI") that could be viewed/edited as a text file, or maybe an XML file, or even an LDAP tree, with the actual storage being handled out of sight. I would hope that something such as the Elektra Initiative would come into fruition and gain more widespread use, giving us Free software users the best of all possible options. Attachment:
signature.asc ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|