O'Reilly logo

Essential Skills for the Agile Developer: A Guide to Better Programming and Design by Amir Kolsky, Ken Pugh, Scott Bain, Alan Shalloway

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

Chapter 13. When and How to Use Inheritance

The mechanism of inheritance is provided in some form by most modern programming languages. However, its improper use can lead to brittle, unnecessarily inflexible architectures that sacrifice encapsulation for little or no gain. This should not, however, lead a developer to conclude that inheritance is bad, or even that it should be used in a minimal, last-resort way. The real question is, what is inheritance good for, and when should it be used?

The Gang of Four

In their seminal book on design patterns,1 Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (who are often affectionately referred to as the “Gang of Four”) issued several important pieces of general advice on software design. ...

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