1.2. The Three Extremes

Abstraction, separation of concerns , and readability underlie many of the guidelines. These notions parallel some of the ideas in Extreme Programming. If abstraction is good, Extreme Abstraction is better; if separation of concerns is good, Extreme Separation is better; and if readability is good, Extreme Readability is better. Many of the guidelines present an extreme position, so you can differentiate it from your current practices. You might wind up finding your own in-between position that balances the tradeoffs in a manner appropriate to your situation.

1.2.1. Abstraction

Abstraction is one of the key principles in an object-oriented system. You specify operations without specifying the details of how those operations will be implemented—the "what" and not the "how." On one level, a system can be described with enough abstraction that either a manual, computer-aided, or automated procedure could implement it. However, sometimes a system is described so abstractly that you cannot imagine how it will operate until you can see a concrete realization, such as a prototype.

The flow of this book parallels abstraction. Operations and interfaces are stated in a language-insensitive manner, using only those facets such as classes, interfaces, and exceptions that are common to all object-oriented languages. Pseudocode is used to present the sequence and logic that an implementation might encompass. To demonstrate that the abstractions can become reality, code ...

Get Prefactoring 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.