27.5. Roles as Concepts vs. Roles in Associations

In a domain model, a real-world role—especially a human role—may be modeled in a number of ways, such as a discrete concept, or expressed as a role in an association.[2] For example, the role of cashier and manager may be expressed in at least the two ways illustrated in Figure 27.11.

[2] For simplicity, other excellent solutions such as those discussed in [Fowler96] are ignored.

Figure 27.11. Two ways to model human roles.

The first approach may be called “roles in associations”; the second “roles as concepts.” Both approaches have advantages.

Roles in associations are appealing because they are ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, 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.