What’s a Compound Pattern?
A compound pattern is a coarse-grained pattern comprised of a set of finer-grained patterns. Singled out in this catalog are some of the more common and important combinations of the patterns, each of which is classified as a compound design pattern.
“Compound Pattern” vs.” Composite Pattern”
A “composite” is generally something that is comprised of interconnected parts. For example, you could legitimately refer to a service composition as a composite of services because the individual parts need to be designed into an aggregate in order to act as a whole. A “compound,” on the other hand, can simply be considered the result of combining a specific set of things together. A chemical compound consists of a combination of ingredients that result in something new when mixed together.
The patterns in this chapter are referred to as “compound patterns” because they document the effects of applying multiple patterns together. One of the most interesting parts of this exploration is that certain combinations of patterns result in design solutions that we are already familiar with, such as with the Enterprise Service Bus and Service Broker.
Compound Patterns and Pattern Relationships
Every pattern profile in the previous chapters includes a Relationships section that provides some insight into interpattern dependencies and how the application of one pattern can affect another.
Compound patterns are also about relationships, but in a different way. The patterns that comprise a compound pattern have a relationship with the compound pattern itself. Whether these patterns have dependencies with or impact each other is immaterial. When studying them as members of a compound pattern, we are only interested in the results of their combined application.
Joint Application vs. Coexistent Application
When we discuss the notion of combining patterns into compounds, it is important to clarify how patterns can be combined.
A compound pattern can represent a set of patterns that are applied together to a particular program or implementation in order to establish a specific set of design characteristics. This would be referred to as joint application.
Alternatively, the patterns that comprise a compound pattern can represent a set of related features provided by a particular program or environment. In this case, a coexistent application of patterns establishes a “solution environment” that may be realized by a combination of tools and technologies.
The notation used to express compound patterns comprised of patterns that are jointly applied versus those applied in a coexistent manner differs, as shown here:
Compound patterns comprised of patterns that are applied to coexist are expressed in a hierarchy, whereas those that are made up of patterns that are applied jointly are represented via a formula-style notation.
What’s a Design Pattern Language?
A pattern language is a set of related patterns that act as building blocks in that they can be carried out in one or more pattern application sequences where each subsequent pattern builds upon the former. The notion of a pattern language originated in building architecture as did the term “pattern sequence” used in association with the order in which patterns can be carried out.
The SOA design pattern catalog, in its entirety, provides an open-ended, master pattern language for SOA. The extent to which different patterns are related can vary, but overall they share a common objective, and endless pattern sequences can be explored.