O'Reilly logo

Refactoring Workbook by William C. Wake

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 12. Library Classes

A modern application will use library classes.

Library classes sometimes put us in a dilemma. We want the library to be different, but we don't want to change it. Even when it's possible to change a library, it carries risks: It affects other clients, and it means we have to redo our changes for future versions of the library.

Smells Covered

  • Incomplete Library Class

Incomplete Library Class

Symptoms

  • You're using a library class, and there's a feature you wish were on that class, but it's not. If it were a normal class, you'd modify it; but, since it is part of a library, you may be unable or unwilling to change it.

Causes

The author of the library class didn't anticipate your need (or declined to support it due to other trade-offs). ...

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