open/closed principle

(redirected from Open Closed Principle)

open/closed principle

(programming, theory)
A principle used in OOPL which states that a class must be open and closed where open means it has the ability to be extended and closed means it cannot be modified other than by extension.

The idea is that once a class has been approved for use having gone through code reviews, unit tests, and other qualifying procedures, you don't want to change the class very much, just extend it. In practice the open/closed principle simply means making good use of abstraction and polymorphism.
References in periodicals archive ?
This detailed analysis and design, using the latest Object Oriented Design methodologies, produced a stable architecture that follows the Open Closed principle for Object Oriented software design: open for extension, closed for modification.