1.1. Class Principles
As mentioned previously, principles lie at the heart of the object-oriented paradigm. The principles discussed in subsequent sections can help guide us during design when it might be difficult to find the most applicable pattern. We typically first look to patterns in solving our challenges. However, if we are unable to find an appropriate pattern, or are unsure if we should use a particular pattern, we should always take into consideration the principles discussed in the following sections. In fact, patterns typically are tailored slightly to fit a particular need, and these principles should be carefully considered when customizing a pattern. Many of the principles presented here first appeared in Robert Martin's Design ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access