|21.1||The simplest approaches||471|
|21.2||Letting objects persist themselves||479|
|21.3||The Data Mapper pattern||486|
|21.4||Facing the real world||490|
As we’ve seen, the marriage of a database and an object-oriented program is usually not a match made in heaven. It’s more of an arranged marriage, although casual relationships are also possible.
Some ceremony is helpful in getting the liaison started. The patterns presented by Martin Fowler in Patterns of Enterprise Application Architecture [P of EAA] are a good rough guide to the alternative ways of creating a systematic and lasting bond between data storage and program code. In this chapter, we will approach these patterns from a slightly different perspective, ...