Encapsulate what changes
Encapsulate what changes is a design principle that states that volatile hotspots in a codebase should be encapsulated behind interfaces. When an anticipated change then occurs, the modifications stay local rather than rippling across the system. The stable parts of the design are protected from the parts that are more volatile.
This is the principle of information hiding applied to volatility rather than implementation detail.
The strategy pattern is a direct application of this principle. It isolates an algorithm that varies behind its own interface, so the surrounding context stays stable when the algorithm changes.
This design principle complements separation of concerns and modular design, both of which encourage sharp boundaries between distinct areas of a system. The encapsulate-what-changes principle narrows this to the isolation of volatile parts from stable parts, which further promotes adaptability.