Chapter 14 Persistence Framework

Persistence and Property Bags

Persisting application data so that it can be reused between different runs of the application is a problem developers continually face. Most of the services provided by the operating system for this effect consist of APIs for reading and writing byte streams to files on disk. The application developer has to take care of issues like file formats, object construction and recovery, object reference resolution, and so on.

SFL offers a solution for this problem in the form of its Persistence package, a set of classes based on the standard COM property bag concept. The property bags implementation provided in SFL is usable in two ways:

  • As a binary library that publishes its services in the form of COM objects

  • At the source code level from a C++ application