What Patterns Are Not

Sometimes, knowing what something isn't helps you see it more clearly, and that's certainly true of patterns. Here are some of the things that people frequently confuse with patterns:

  • Patterns aren't frameworks (and vice versa). Frameworks are bits of reusable code, and patterns are textual explanations of frameworks, showing how they were built and how they can be customized.
  • Patterns aren't algorithms. An algorithm describes a repeatable, terminating process of well-defined steps that produce some result, but it doesn't explain when those steps should be used or why they're the appropriate solution. A pattern includes this rationale. Likewise, an algorithm won't describe the trade-offs and analysis that go into deciding that the steps are the correct steps, but a pattern tells the reader why it's the right ordering of steps.
  • Patterns aren't patents. These two terms sometimes confuse non-native English speakers because they sound similar. A patent grants the exclusive right to produce a useful product, whereas a pattern is a description of how to solve a problem in a way that has proven to be effective. Patents must be novel, but patterns describe proven practice. The goal of a patent author is to allow the patent holder to be the only one to build the patented invention. The goal of a pattern writer, on the other hand, is to share the knowledge of how to reuse and achieve the benefits of the pattern's solution.
  • Patterns aren't exclusively for OO design ...

Get Pattern-Oriented Software Architecture For Dummies 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.