Pattern : OPTIONAL ELEMENTS WHEN HELPFUL
- PROBLEM : How do you communicate essential information that does not fit well into the mandatory elements?
- CONTEXT : You are writing a pattern and have applied Mandatory Elements Present.
- FORCES :
- All patterns do not require the same kinds of information to be effectively communicated.
- Capturing all elements regardless of need only clutters many patterns.
- SOLUTION : The following sections may be included if they make the pattern easier to understand or provide better linkage between
the pattern in question and related patterns:
Indications: The symptoms that might indicate that the problem exists.
Resulting Context: The context that we find ourselves in after the pattern has been applied. It can
include
one or more new problems to solve. This sets us up for applying more patterns, possibly the next pattern(s) in a language.
Related Patterns: Other patterns that may be of interest to the reader. The kinds of patterns include:
Other solutions to the same problem,
More general or (possibly domain) specific variations of the pattern,
Patterns that solve some of the problems in the resulting context (set up by this pattern)
Examples: Concrete examples that illustrate the application of the pattern.
Code Samples: Sample code showing how to implement the pattern.
Rationale: An explanation of why this solution is most appropriate for the stated problem within this
context.
Aliases: Other names by which this pattern might be known.
Acknowledgments: You should acknowledge anyone who contributed significantly to the development of the
pattern (or language) or the techniques
described in it. If your pattern has been through a "shepherding process" or "writer's workshop", significant contributors (such as the
shepherd!) are candidates for being acknowledged.
- EXAMPLE : In Design Patterns, the Resulting Context is known as Consequences and Code Samples is called Sample Code. Examples is
called Known Uses and is augmented by a more concrete representation of the problem in the Motivation section.
[Cockburn96] introduced the idea of an Indications element, there called Symptoms.