Thursday, October 25, 2018

Fundamental Tenets of Design Patterns Thinking

Four quadrants: an arrow showing pressure flow into a class from use, a switch statement with a "buster" circle, a class coupling to the top of a hierarchy, and preference of usage over inheritance

There are four basic principles of deep design thinking. These are all paraphrased to make them easier to digest in 2018.
  • Start with contracts and drive implementations to serve needs.
  • Encapsulate variation so you need only attend to it in the fewest places possible.
  • Couple to the highest abstractions possible.
  • Delegate between objects rather than inheriting between classes.
These principles underlie all the design patterns wherever they apply.

One could write a book on these four principles. In fact, a lot of people have.

I'm going to dig into each of these more deeply in subsequent posts.