February 2019
Beginner
694 pages
18h 4m
English
The open-closed principle states that an object should be open to extension, but closed for modification. In other words, once an interface has been designed for a class, changes over time to this interface should be achieved through inheritance, and not by modifying the interface directly.
Note that if you are writing libraries that are consumed by third-parties through an API, then this principle is essential for API design. An API should always try to ensure backward compatibility, and as such, changes should only be made through a new, versioned release.
Read now
Unlock full access