software master at the intersection of technology, science and art

home

download

open-closed prinicple


The Open-Close Principle was introduced by Bertrand Meyer in his book Object-Oriented Siftware Construction and states


A software artifact should be open for extension but closed for modification

As Martin states:

The OCP is one of the driving forces behind the architecture of systems.The goal is to make the system easy to extend without incurring a high impact of change. This goal is accomplished by partitioning the system into components and arranging those components into a dependency hierarchy that protects higher-level components from changes in lower-level components