Patterns
Pattern Template
The J2EE patterns are all structured according to a defined pattern template. The pattern template sections each contribute to understanding the particular pattern. You'll notice also that we've tried to give each J2EE pattern a descriptive pattern name. While it is difficult to fully encompass a single pattern in its name, the pattern names are intended to provide sufficient insight into the function of the pattern.
We have adopted a pattern template that consists of the following sections:
- Context:
Sets the environment under which the pattern exists.
- Problem:
Describes the design issues faced by the developer.
- Forces:
Lists the reasons and motivations that affect the problem and the solution. The list of forces highlights the reasons why one might choose to use the pattern and provides a justification for using the pattern.
- Solution:
Describes the solution approach briefly and the solution elements in detail. The solution section contains two sub-sections:
- Structure:
Uses UML class diagrams to show the basic structure of the solution. The UML Sequence diagrams in this section present the dynamic mechanisms of the solution. There is a detailed explanation of the participants and collaborations.
- Strategies:
Describes different ways a pattern may be implemented. Please see Patterns vs. Strategies to gain a better understanding of strategies.
- Consequences:
Here we describe the pattern trade-offs. Generally, this section focuses on the results of using a particular pattern or its strategy, and notes the pros and cons that may result from the application of the pattern.
- Related Patterns:
This section lists other relevant patterns in the J2EE patterns catalog or from other external resources, such as the GoF design patterns. For each related pattern, there is a brief description of its relationship to the pattern being described.