The INI file Manifesto

This manifesto explains why the Streambolics libraries use Windows .INI files instead of XML files or the registry.

The Registry does not allow XCOPY installation

This is one of the major problems with the registry: in order to install your application, you need to copy some data somewhere in the registry. Also, there is only one slot (tbd)

Microsoft is lying about the registry

They want you to believe the registry can replace INI files everywhere. On an XP machine, look in any of the folders in your hard disk. Chances are there is one hidden desktop.ini or explorer.ini lying around, giving the positions of the icons or other information about the folder.

XML Files are too complicated to edit

An XML file cannot easily be edited by hand. While you can almost explain to anyone what this means:
  [John Doe]
  FirstName=John
  FamilyName=Doe
  WorkPhone=555-0123

try to do the same with an XML file...
Also, and perhaps even more importantly, it is actually very difficult to FUBAR an INI file, while a single misplaced character makes the whole XML file unreadable for good. A typing error in an INI file will probably make one parameter unreadable. Add a little bad luck (the removal of an opening bracket in the section name,) and a whole section will be unreadable. In most cases, the error will be easily spotted, even in a very large file. You really have to work hard to make the whole file unrecoverable. In XML, all you have to do is to forget one single closing tag, and you may spend days trying to figure out where it should have been.

An INI file is a good approximation of an SQL table

An INI file is basically a list of sections having individual parameter values. A section is a good approximation of a row in an SQL table, with the section name being the primary key. If your setup can be stored in an SQL table, odds are that it can be stored in an INI file too.
Of course, there is no such thing as secondary keys, indexes, transactions or referential integrity. An INI file is not a relational database.

Last edited Nov 19, 2009 at 11:54 AM by sleclercq, version 1

Comments

No comments yet.