Package principles
The package principles are a set of five design principles formulated by Robert C Martin, who also coined the SOLID acronym.
The package and SOLID principles share the goals of keeping software maintainable and avoiding the symptoms of degraded design, such as rigidity, fragility, immobility, and viscosity. But, whereas the SOLID principles target the level of classes, the package principles target the level of larger components that contain multiple classes — packages or modules. The principles can be applied at even larger scales, too, such as at the level of independently-deployable services.
The package principles are the following.
- Reuse/release equivalence principle (REP)
- Common reuse principle (CRP)
- Common closure principle (CCP)
- Acyclic dependencies principle (ADP)
- Stable dependencies principle (SDP)
- Stable abstractions principle (SAP)
The package principles reassert the universal principles of low coupling, high cohesion, single responsibility, hierarchical (acyclic) decomposition, and dependency inversion.