|
| 1 | +# Building Block View |
| 2 | + |
| 3 | +> OFT: This chapter is usually every readers favorite. First because it usually contains a lot of pictures, second because it advances the understanding of the system most. |
| 4 | +
|
| 5 | +This chapter contains the building block breakdown of the system. |
| 6 | + |
| 7 | +## Building Blocks, Components, Compositions and Software Units |
| 8 | + |
| 9 | +The diagram below shows the relation of components, compositions and software units. |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +Building blocks are system components and we will use the two terms synonymously throughout this document. |
| 14 | + |
| 15 | +Components come in two flavors: Software Components and Hardware Components. |
| 16 | + |
| 17 | +Compositions are constructed from sets of components. From an outside-perspective they are components to. |
| 18 | + |
| 19 | +Defining Software Units is trickier than it looks at first glance because it is much easier to find criteria to define what isn't a Software Unit than to find hard criteria that defines what is one. |
| 20 | + |
| 21 | +> OFT: Many projects try to avoid that problem by defining that a Software Unit is a single class, but that contradicts the idea that software units should be reusable without modification in another project. Copying single classes between projects is not a promising practice. |
| 22 | +
|
| 23 | +We define a Software Unit as a Software Component that cannot be split further without sacrificing reusability. |
| 24 | + |
| 25 | +> OFT: there is heated discussion between software developers whether or not you are allowed to test below the level you defined for your software units. |
| 26 | +
|
| 27 | +> OFT: The contra-faction usually states that you do not have written requirements below unit level and therefore no definition for what to test. |
| 28 | +
|
| 29 | +> OFT: The pro-faction dismisses this argument saying that the developer knows what algorithms need to do even below unit level, otherwise they would not be able to implement them. From our experience this approach is more practical in real-world projects. It also helps you locating error more precisely. |
| 30 | +
|
| 31 | +## How Building Block Relations are Depicted in this chapter |
| 32 | + |
| 33 | +The associations between the components represent "A-knows-B" relationships. This helps determining dependencies between the components. They are directed associations. The aim is to avoid circular dependencies between the components. Bidirectional associations must also be avoided since they are only a special form of a circular dependency. |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +Circular dependencies would create unacceptable constraints on the development life cycle and deployment of the components. |
| 38 | + |
| 39 | +Since the circle has no start, there is no component that you could deploy first without creating a broken dependency for at least a short time. This means that you have to release and deploy all components at the same time which is bound to fail. |
| 40 | + |
| 41 | +## Building Block Overview |
| 42 | + |
| 43 | +This section contains the building block breakdown on the highest level. |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +## Top-Level Building Blocks |
| 48 | + |
| 49 | +> OFT: In this section you give a short description of the building blocks at the highest level of abstraction. It is a good idea to roughly define what they are responsible for. |
| 50 | +
|
| 51 | +> OFT: If you want to make sure the components you define in this architecture appear in the actual detailed designs (and in the implementations) we recommend that you create one specification item for each internal component and require coverage on detailed design level (here `dsn`). Of course you should talk the component breakdown through with the implementing teams in order to get their agreement. Otherwise you will end up with a nice architecture document that nobody cares about. |
| 52 | +
|
| 53 | +### AutoYummyBox |
| 54 | +`arch~ayb.autoyummybox~1` |
| 55 | + |
| 56 | +This hardware component is a vending machine with a built-in 3D food printer. It is responsible for printing and cooking the dishes. |
| 57 | + |
| 58 | +Needs: dsn |
| 59 | + |
| 60 | +> OFT: Note that we did not cover a SRS requirement with this component decision. The reason is simple: you would have to link each SRS requirement that is implemented in this component with the component in addition to the runtime requirements. This is way to error-prone to be practical and also not very helpful. |
| 61 | +
|
| 62 | +### MachineApplication |
| 63 | +`arch~ayb.machine-application~1` |
| 64 | + |
| 65 | +The MachineApplication is an embedded software that controls the operation of the [AutoYummyBox](#autoyummybox) hardware and communicates with the [MachineManager](#machinemanager) backend. |
| 66 | + |
| 67 | +Needs: arch |
| 68 | + |
| 69 | +### MachineManager |
| 70 | +`arch~ayb.machinemanager~1` |
| 71 | + |
| 72 | +The MachineManager is a backend component that serves as a single entry point for all communication with the [MachineApplication](#machineapplication). |
| 73 | + |
| 74 | +Needs: arch |
| 75 | + |
| 76 | +> OFT: ... |
| 77 | +
|
| 78 | +> OFT: We stop the enumeration of top-level components at this point of the example because adding more would not contribute to a better understanding |
| 79 | +
|
| 80 | +> OFT: Next comes a breakdown of the internal component structure of the previously defined top-level components. We recommend to keep each in a separate file since it is likely that different authors will have to work on the details in parallel in projects of a certain complexity. |
| 81 | +
|
| 82 | +## Sub-Level 1 Building Blocks |
| 83 | + |
| 84 | +* [MachineApplication Building Blocks](building_blocks/MachineApplication.md) |
| 85 | +* ... |
0 commit comments