Saving the Object to a Flat File
In this section, we will use a flat file to illustrate object persistence. I define a flat file as a simple file managed by the operating system. This is a very simple concept, so don't get too caught up in this description.
Many people do not like to use the term flat file. The word flat implies that the object is literally flattened, and in a way it is.
One of the things you might have thought about is the fact that an object cannot be saved to a file like a simple variable—and this is true. In fact, the problem of saving the state of an object has lead to a complete software application industry, which we will discuss at length later in this chapter. Normally, when you save a number of variables ...