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). ...

Get Refactoring Workbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.