Java Application Architecture

Modularity Patterns with Examples Using OSGi

Category: Usability Pattern

External Configuration

For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Modules should be externally configurable.
Description
The ability to configure a module to it’s usage context increases our ability to reuse the module across contexts, whereas tightly coupling configuration to the module prohibits reuse. External configuration allows a module to be [...]

Module Facade

For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Create a facade serving as a coarse-grained entry point to the modules underlying implementation.
Description
We create fine-grained and lightweight modules to increase module reuse. Unfortunately, fine-grained modules can also be difficult to use because the user must understand the API [...]

Published Interface

For the full description, implementation variations, consequences, and detailed sample, see Page 150 in Java Application Architecture.
Statement
Make a modules published interface well-known.
Description
A modules’s PublishedInterface is the set of public methods on the public classes within the module that you expect developers using the module to invoke and work with. A PublishedInterface is subtly different from [...]