Book section 13
Architects build a lot of models, so it’s important to know how the models relate to each other. For example, is this diagram a simple subset of the other diagram? Or does it zoom in and provide more details? To get these ideas straight, this section describes the most common relationships that you will need to use when modeling.
Throughout this book, you have seen relationships between models. For example, the canonical model structure of domain, design, and code models uses the designation and refinement relationships. Refinement is also used to relate boundary models to internals models. Views are used everywhere. So far, these relationships have been described intuitively and informally.
At some point, however, you will want to know that the ground you are building on is more solid than that. This chapter adds precision to your understanding of the relationships but, in an effort to stay readable, it stops short of being fully formal. You can safely skip over this chapter on your first read and come back later. A full understanding of model relationships will enrich your conceptual model of architecture and consequently your ability to detect bugs in your models. The conceptual model taught throughout this book makes some modeling choices, notably the use of closed refinement semantics and the use of master models instead of views-as-requirements. By the end of this chapter, you will understand why these were chosen and will be ready to read models that use different choices.
The modeling relationships are more general than software architecture or the Unified Modeling Language (UML), so you will see little of those here. Instead, the relationships are explained using an example of a house, for example relating the real house to its blueprints, and relating diagrams of its floorplan to a three-dimensional model of it.
The following sections discuss nine relationships between models, summarized in Figure 13.1: projection (view), partition, composition, classification, generalization, designation, refinement, binding, and dependency. The chapter concludes with an example showing how all the relationships can be used together. We begin with projection, the most commonly used relationship.
Figure 13.1: A summary of the relationships described in this chapter.
|Projection/view||Model-Model||Subset of details with optional transformation|
|Partition||Model-Models||Subdividing a model|
|Classification||Type-Instance||Categorization of instances|
|Generalization||Supertype-Subtype||Subsuming relationship between categories|
|Designation||World/Model-Model||Correspondences between models|
|Refinement||Model-Model||Low-detail to high-detail|
|Binding||Model-Model||Conforming to a pattern|
|Dependency||Model-Model||Change to one may imply change to other|
subscribe via RSS