Common reuse principle

The common reuse principle (CRP) is a package design principle that states that the sub-components of a package should be exactly the ones that are being (re)used together. Or the other way around, components that are being (re)used together should be packaged into a larger component.

This also implies that sub-components that are not frequently used in conjunction with the other sub-components should not be in the respective component.

This perspective helps in deciding what belongs in a component and what doesn’t. It aims at a system decomposition of loosely coupled and highly cohesive components.

This obviously echoes the single responsibility principle. It also echoes the interface segregation principle, as it ensures that clients aren’t forced to depend on concepts they don’t care about.

This is one of Robert C Martin’s six package principles.