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.
Flat Files
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 ...
Get Object-Oriented Thought Process, The, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.