CPSA Designing Building Blocks 5 — Questions and Answers
Question 1: Which iSAQB arc42 view is PRIMARILY used to document building blocks and their static relationships?
- Runtime view
- Deployment view
- Building block view (Correct answer)
- Context view
Correct answer: Building block view
The arc42 building block view documents the system's static decomposition into building blocks and their inter-relationships.
Question 2: When applying the Dependency Inversion Principle to building blocks, high-level modules should:
- Directly instantiate low-level module implementations
- Depend on abstractions rather than concrete low-level implementations (Correct answer)
- Avoid using interfaces to minimize complexity
- Always be placed in the lowest architectural layer
Correct answer: Depend on abstractions rather than concrete low-level implementations
DIP requires that high-level modules depend on abstractions (interfaces), with low-level modules implementing those abstractions, inverting the traditional dependency direction.
Question 3: A team notices that every change to the 'Payment' building block also requires changes to 'Reporting' and 'Audit'. This MOST likely indicates:
- Correct use of the Single Responsibility Principle
- Inappropriate coupling or shared responsibility across blocks (Correct answer)
- Optimal cohesion within each block
- A well-designed event-driven architecture
Correct answer: Inappropriate coupling or shared responsibility across blocks
When unrelated blocks must change in lockstep, it signals excessive coupling or incorrectly distributed responsibilities.
Question 4: Which pattern allows a building block to adapt an incompatible interface to one expected by its client?
- Decorator
- Observer
- Adapter (Correct answer)
- Proxy
Correct answer: Adapter
The Adapter pattern wraps an incompatible interface and exposes the interface expected by the client building block.
Question 5: In building block design, 'cohesion' and 'coupling' are considered opposing forces because:
- High cohesion always causes high coupling
- Increasing a block's internal cohesion tends to reduce its external coupling (Correct answer)
- Low coupling requires low cohesion
- They measure the same property from different perspectives
Correct answer: Increasing a block's internal cohesion tends to reduce its external coupling
Focusing a block's responsibilities internally (high cohesion) naturally limits what it needs from other blocks, reducing external coupling.
Question 6: Which of the following is an example of 'logical' versus 'physical' building blocks?
- A class versus an interface
- An architectural component versus its deployment artifact (JAR, DLL) (Correct answer)
- A service versus a database
- A module versus a package
Correct answer: An architectural component versus its deployment artifact (JAR, DLL)
Logical building blocks represent design-time abstractions, while physical building blocks are the actual deployment artifacts that implement them.
Question 7: Why is documenting the rationale for building block decomposition decisions considered important in arc42?
- It satisfies compliance auditing requirements automatically
- It allows future architects to understand trade-offs and avoid re-litigating settled decisions (Correct answer)
- It replaces the need for interface documentation
- It is required by all agile methodologies
Correct answer: It allows future architects to understand trade-offs and avoid re-litigating settled decisions
Recording rationale preserves the reasoning behind decomposition choices so future teams understand constraints and avoid repeating past analysis.
Which iSAQB arc42 view is PRIMARILY used to document building blocks and their static relationships?