Modular Architecture

Patterns of Modular Architecture

Category: Base Pattern

Cohesive Modules

Statement
Module behavior should serve a singular purpose.
Description
Cohesion is a measure of how closely related and focused the various responsibilities of a module are. In the worst case scenario, little emphasis is placed on the allocation of classes to modules. Instead, modules are assembled at random, and the likelihood that modules suffer from lack of cohesion [...]

Module Reuse

Statement
Emphasize reuse at the module level.
Description
One of the oft cited benefits of object oriented development is reuse. Mostly, we’ve failed miserably in achieving any degree of reuse that is directly attributable to objects. A large part of this failure is very likely because using objects does not guarantee reuse, but actually requires a significant amount [...]

Manage Relationships

Statement
Design module relationships.
Description
A relationship between two modules exists when a class within one module imports at least a single class within another module. In other words:
If changing the contents of a module, M2, may impact the contents of another module, M1, we can say that M1 has a Physical Dependency on M2. [JOUP02]
In Figure 1, [...]