Typically, a design pattern is described using several of the following items:
- Pattern name - a brief, descriptive, and unique name to identify the pattern.
- Classification - a category assignment according to usage (see above).
- Intent - a description of the goal of the pattern and the reasons for employing it.
- Also known as (AKA) - patterns are often known by more than one name. Additional names are documented here.
- Motivation (Forces) - a scenario comprising a problem and a context in which this pattern should be used, i.e. when and where to use this pattern.
- Applicability - describes various situations (contexts) in which this pattern is usable.
- Structure - a graphical representation of the pattern, typically in Unified Modeling Language (UML). Primarily, class diagrams and interaction diagrams are used.
- Participants - a summary of the various classes and objects employed in this pattern and their roles in the design pattern.
- Collaboration - a description of class and object interactions.
- Consequences - a description of the results, trade-offs, and any side effects involved in applying this pattern.
- Implementation - a description of the implementation of the pattern—the pattern "solution". Also provided are notes, suggestions, and techniques helpful in implementing this pattern.
- Sample code - a source code example of how this pattern can be implemented in a particular programming language.
- Known uses - a listing of actual usages of this pattern.
- Related patterns - a listing of related patterns which can be used either in conjunction with or in place of this pattern. Differences between similar patterns are highlighted.
No comments:
Post a Comment