This chapter is from the book
Pattern Catalog
The following are the modularity patterns:
- Base Patterns
- Manage Relationships: Design module relationships.
- Module Reuse: Emphasize reusability at the module level.
- Cohesive Modules: Module behavior should serve a singular purpose.
- Dependency Patterns
- Acyclic Relationships: Module relationships must be acyclic.
- Levelize Modules: Module relationships should be levelized.
- Physical Layers: Module relationships should not violate the conceptual layers.
- Container Independence: Modules should be independent of the runtime container.
- Independent Deployment: Modules should be independently deployable units.
- Usability Patterns
- Published Interface: Make a module’s published interface well known.
- External Configuration: Modules should be externally configurable.
- Default Implementation: Provide modules with a default implementation.
- Module Facade: Create a facade serving as a coarse-grained entry point to another fine-grained module’s underlying implementation.
- Extensibility Patterns
- Abstract Module: Depend upon the abstract elements of a module.
- Implementation Factory: Use factories to create a module’s implementation classes.
- Separate Abstractions: Place abstractions and the classes that implement them in separate modules.
- Utility Patterns
- Colocate Exceptions: Exceptions should be close to the class or interface that throws them.
- Levelize Build: Execute the build in accordance with module levelization.
- Test Module: Each module should have a corresponding test module.