XMLStor
My most recent project is XMLStor, it’s not ready for public consumption yet, but will be made open source in the near future, under the Berkeley license if possible. It utilizes Chris Lichti’s clRTTI, a freeware unit that makes managing RTTI a breeze. It comes with implementations for saving to INI files as well as the registry. I took the ideas from his serialization unit and made a non-visual component that allows the programmer to save every property of a specified object. Unlike other INI/Settings units, almost every kind of object is automatically saved with its property names, classnames, and data type, without having specific definitions for each class. The exceptions to this are specific classes such as TContainer and TStrings, which are handled internally. There is also the ability for the programmer to specify a list of specific classes which require special handling through the use of an event.
XMLStor makes the saving and loading of even monstorous applications a breeze. At the moment, properties to be saved can only be stored programmatically (as this is how I will use it). Shortly, however, they will be able to be read in a number of different ways, from a plain list in a text file to XML. I could say, technically, that you can automatically save and load any number of properties or objects without a single line of code. This would be taking a bit of liberty with the idea of what a line of code is, however, as you are required, at the moment, to list each property or object in a string list. But that is where the configuration starts and ends.
If you want to save the value of a given checkbox, you simply drop the XMLStor component on your form, open up the PropertyList editor, and add a line like “CheckBox1.Checked”. If you leave the options at their defaults, every time your program is loaded, the value for CheckBox1.Checked will be loaded from the specified XML file, as well as being saved upon termination. This is a modest improvement over using an INI, as it saves a few parameters and there is no need to specify WriteString, WriteInteger, etc.
However, the real power of XMLStor is in its ability to save the properties of any TPersistent descendant with just the same configuration. If a user is allowed to, for example, customize the font of Memo1, saving the various settings such as Font.Name, Font.Size, and Font.Style can take several lines and turns into a real headache when saving an entire component. Being able to save the entire Font object by specifying “Memo1.Font” saves a bit of time and avoids some real configuration hassles. But being able to save “Form1″, with every property of it and all of its child components, from just a single line, that’s really allowing the programmer to get back to designing features instead of figuring out how to save them between sessions.



