22.4. Protected Variations

Identify points of predicted variation or instability; assign responsibilities to create a stable interface around them.

Solution

Note: The term “interface” is used in the broadest sense of an access view; it does not literally only mean something like a Java or COM interface.

How to design objects, subsystems, and systems so that the variations or instability in these elements does not have an undesirable impact on other elements?

Problem

For example, the prior external tax calculator problem and its solution with Polymorphism illustrate Protected Variations (Figure 22.1). The point of instability or variation is the different interfaces or APIs of external tax calculators. The POS system needs to be able to integrate ...

Get Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition 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.