6 Pattern Compounds

All know that the drop merges into the oceanbut few know that the ocean merges into the drop.

Kabir, weaver, mystic, and poet

This chapter examines pattern compounds, which are patterns of design that are recurrent and, on closer inspection, have elements of design within them that are also recurrent—patterns! Design often embraces many different levels, so it is not surprising that we can see this reflected in the grouping and separation of patterns. A named pattern provides a description and a way to communicate design, whatever the granularity of the concepts it covers.

6.1 Recurring Pattern Arrangements

Many patterns are grouped together at one apparent level of detail, yet when you examine them closely, you can see other patterns contained within them. For example, COMMAND can be seen within ENUMERATION METHOD. At other times we can see the common, coincident application of two or more patterns, such as a COMMAND implemented as a COMPOSITE, that can be named naturally and almost without thought as a single entity, such as COMPOSITE COMMAND. By analogy with language, where a compound word is a word made up of two or more existing words, we can consider them as examples of compound patterns or pattern compounds. The analogy with chemical compounds, which are made up of constituent elements, offers another coherent perspective on the idea.

Pattern compounds were originally named composite patterns [Rie98], but in the pattern space there is obvious scope ...

Get Pattern Oriented Software Architecture Volume 5: On Patterns and Pattern Languages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.