Here's how shelve might be used by an application. We'll look at parts of an application that edits and saves microblog posts. We'll break the application into two tiers: the application tier and the data tier. Within an application tier, we'll distinguish between two layers:
- Application processing: Within the application layer, objects are not persistent. These classes will embody the behavior of the application as a whole. These classes respond to the user selection of commands, menu items, buttons, and other processing elements.
- Problem domain data model: These are the objects that will get written to a shelf. These objects embody the state of the application as a whole.
The classes to define an independent ...