Guidelines: Design SubsystemTopics
Subsystem
Usage
|
|
Details |
| Look for optionality | If a particular collaboration (or sub-collaboration) represents optional behavior, enclose it in a subsystem. Features which may be removed, upgraded, or replaced with alternatives should be considered independent. |
| Look to the user interface of the system. | If the user interface is relatively independent of the entity classes in the system (i.e. the two can and will change independently), create subsystems which are horizontally integrated: group related user interface boundary classes together in a subsystem, and group related entity classes together in another subsystem. |
| If the user interface and the entity classes it displays are tightly coupled (i.e. a change in one triggers a change in the other), create subsystems which are vertically integrated: enclose related boundary and entity classes in common subsystem. | |
| Look to the Actors | Separate functionality used by two different actors, since each actor may independently change their requirements on the system. |
| Look for coupling and cohesion between classes | Highly coupled or cohesive classes collaborate to provide some set of services. Organize highly coupled classes into subsystems, separating classes along lines of weak coupling. In some cases, weak coupling can be eliminated entirely by splitting classes into smaller classes with more cohesive responsibilities. |
| Look at substitution | If there are several levels of service specified for a particular capability (example: high, medium and low availability), represent each service level as a separate subsystem, each of which will realize the same set of interfaces. By doing so, the subsystems are substitutable for one another. |
| Look at distribution | If particular functionality must reside on a particular node (such as a client workstation, or a particular device), ensure that the subsystem functionality maps onto a single node. Split subsystems into several nodes, where necessary, in order to achieve this. |
Once classes have been organized into subsystems, update the Use Case Realizations accordingly.
Once the subsystem has been created:
Components are implementation things; to represent the component in the design, a subsystem can be used as a proxy for the component.
To this end, Design Subsystems provide an ideal way to represent components in the Design Model: they are design elements which encapsulate the behavior of a number of classes (as components encapsulate the behavior of a number of class instances), and their behavior is only accessed via the interfaces they realize (as is the case with components).
Examples of products the system uses that you can represent by a subsystem include:
When defining the subsystem to represent the product, also define one or more interfaces to represent the product interfaces.
Subsystems differ from packages in their semantics: a subsystem is a kind of package which provides behavior through one or more interfaces which it realizes. Packages provide no behavior; they are simply containers of things which provide behavior.
The reason for using a subsystem instead of a package is that subsystems completely encapsulate their contents, providing behavior only through their interfaces. The benefit of this is that, unlike a package, the contents and internal behaviors of a subsystem can change with complete freedom so long as the subsystem's interfaces remain constant. Subsystems also provide a 'replaceable design' element: any two subsystems (or classes, for that matter) which realize the same interfaces are interchangeable.
In order to ensure that subsystems are replaceable elements in the model, a few rules need to be enforced:
An example of Subsystem and Package dependencies is shown below:

Subsystem and Package Dependencies in the Design Model
![]()
|
|