By: J. Noble
Published in: PLoPD4
Pages: 73-89
Category: Behavioral
Summary: How objects can model relationships in programs.
Pages: 76-78
To design a small, simple, one-to-one relationship, make an attribute to represent the relationship.
Pages: 78-80
Use a relationship object to represent a large, complex relationship.
Pages: 80-82
Use a Collection to design a one-to-many relationship.
Pages: 82-84
To design a globally important one-to-one relationship, make an active value, an object that reifies a single variable. It should have an attribute to hold the variable's value with an accessor and a set method.
Pages: 84-88
To represent a two-way relationship, make a consistent set of one-way relationships.