Understanding Pattern Classifications

Patterns contain several required sections — including Problem, Context, Forces, and Solution — but there are many ways to combine these sections. If you've looked at any patterns, you probably noticed that they all appear slightly different, and you may have even thought that some of them weren't patterns at all!

images

I explain the parts of a pattern and the contents of its parts in Chapter 4.

There are many ways to slice up the universe of patterns. So, in this section, I describe the most common classification schemes, starting with the pattern styles you're most likely to encounter.

Styles

If you open a poetry anthology, you'll see that the poems are written in many different styles. Patterns are similar. Pattern authors don't always choose to write their patterns in the same styles, so they vary the way that the material is presented. Pattern styles are the different ways of combining the same essential sections into a pattern.

Table 6-1 compares styles from several sources:

  • This book
  • Pattern-Oriented Software Architecture: A System of Patterns, by Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal (Wiley)
  • Design Patterns: Elements of Reusable Object-Oriented Software, by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (Addison-Wesley Professional)
  • A Pattern Language, by Christopher Alexander, Sara ...

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.