O'Reilly logo

Agile Principles, Patterns, and Practices in C# by Robert C. Martin, Micah Martin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9. The Open/Closed Principle (OCP)

image

© Jennifer M. Kohnke

Dutch Door: Noun. A door divided in two horizontally so that either part can be left open or closed.

The American Heritage Dictionary of the English Language, Fourth Edition, 2000

As Ivar Jacobson has said, “All systems change during their life cycles. This must be borne in mind when developing systems expected to last longer than the first version.”1 How can we create designs that are stable in the face of change and that will last longer than the first version? Bertrand Meyer2 gave us guidance as long ago as 1988 when he coined the now-famous open/closed principle. To paraphrase him: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required