5. Building Block View
Content
The building block view shows the static decomposition of the system into building blocks (modules, components, subsystems, classes, interfaces, packages, libraries, frameworks, layers, partitions, tiers, functions, macros, operations, data structures, …) as well as their dependencies (relationships, associations, …)
This view is mandatory for every architecture documentation. In analogy to a house this is the floor plan.
Motivation
Maintain an overview of your source code by making its structure understandable through abstraction.
This allows you to communicate with your stakeholder on an abstract level without disclosing implementation details.
Form
The building block view is a hierarchial collection of black boxes and white boxes (see figure below) and their descriptions.
- Level 1 is the white box description of the overall system together with black box descriptions of all contained building blocks.
- Level 2 zooms into some building blocks of level 1. Thus it contains the white box description of selected building blocks of level 1, together with black box descriptions of their internal building blocks.
- Level 3 (not shown in the diagram above) zooms into details of selected building blocks of level 2, and so on.
Examples
5.1 Whitebox Overall System
Here you describe the decomposition of the overall system using the following white box template. It contains
- an overview diagram
- a motivation for the decomposition
- black box descriptions of the contained building blocks. For these we offer you alternatives:
- use one table for a short and pragmatic overview of all contained building blocks and their interfaces
- use a list of black box descriptions of the building blocks according to the black box template (see below). Depending on your choice of tool this list could be sub-chapters (in text files), sub-pages (in a Wiki) or nested elements (in a modelling tool).
- (optional:) important interfaces, that are not explained in the black box templates of a building block, but are very important for understanding the white box.
Since there are so many ways to specify interfaces why do not provide a specific template for them.
In the best case you will get away with examples or simple signatures.
<insert overview diagram of overall system>
<describe motivation/reasoning for overall system decomposition>
<describe contained building blocks (blackboxes)>
<(optionally) describe important interfaces>
Insert your explanations of black boxes from level 1:
If you use tabular form you will only describe your black boxes with name and responsibility according to the following schema:
Name | Responsibility |
---|---|
<black box 1> | <Text> |
<black box 2> | <Text> |
If you use a list of black box descriptions then you fill in a separate black box template for every important building block . Its headline is the name of the black box.
<Name Blackbox 1>
Here you describe <black box 1> according the the following black box template:
- Purpose/Responsibility
- Interface(s), when they are not extracted as separate paragraphs. This interfaces may include qualities and performance characteristics.
- (Optional) Quality-/Performance characteristics of the black box, e.g.availability, run time behavior, ….
- (Optional) directory/file location
- (Optional) Fulfilled requirements (if you need traceability to requirements).
- (Optional) Open issues/problems/risks
You can use a table or text.
<Purpose/Responsibility>
<Interface(s)>
<(Optional) Quality/Performance Characteristics>
<(Optional) Directory/File Location>
<(Optional) Fulfilled Requirements>
<(optional) Open Issues/Problems/Risks>
<Name black box 2>
<black box template>
<Name black box n>
<black box template>
<Name interface 1>
…
<Name interface m>
5.2 Level 2
Here you can specify the inner structure of (some) building blocks from level 1 as white boxes.
You have to decide which building blocks of your system are important enough to justify such a detailed description. Please prefer relevance over completeness. Specify important, surprising, risky, complex or volatile building blocks. Leave out normal, simple, boring or standardized parts of your system
5.2.1 White Box <building block x.2>
Specifies the internal structure of building block 1.
Use the white box template (see above).
< insert white box template of building block 1 >
5.2.2 White Box <building block 2>
< insert white box template for building block 2 >
…
5.2.n White Box <building block n>
< insert white box template for building block n >
5.3 Level 3
Here you can specify the inner structure of (some) building blocks from level 2 as white boxes.
When you need more detailed levels of your architecture please copy this part of arc42 for additional levels.
5.3.1 White Box <building block x.1>
Specifies the internal structure of building block x.1.
< insert white box template of building block x.1 >
5.3.2 White Box <building block x.2>
< insert white box template of building block x.2 >
5.3.3 White Box <building block y.1>
< insert white box template of building block y.1 >
Further Info
Tips
Related Questions
See here for questions related to building blocks, blackbox, whitebox and interfaces.