Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Software design pattern
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Documentation== The documentation for a design pattern describes the context in which the pattern is used, the forces within the context that the pattern seeks to resolve, and the suggested solution.<ref name = "GabrielHillside">{{cite web | first = Dick | last = Gabriel | author-link = Richard P. Gabriel | title = A Pattern Definition | url = http://hillside.net/patterns/definition.html | access-date = 2007-03-06 |archive-url = https://web.archive.org/web/20070209224120/http://hillside.net/patterns/definition.html <!-- Bot retrieved archive --> | archive-date = 2007-02-09}}</ref> There is no single, standard format for documenting design patterns. Rather, a variety of different formats have been used by different pattern authors. However, according to [[Martin Fowler (software engineer)|Martin Fowler]], certain pattern forms have become more well-known than others, and consequently become common starting points for new pattern-writing efforts.<ref name = "Fowler2006">{{cite web | first = Martin | last = Fowler | author-link = Martin Fowler (software engineer) | title = Writing Software Patterns | url = http://www.martinfowler.com/articles/writingPatterns.html | date = 2006-08-01 | access-date = 2007-03-06 }}</ref> One example of a commonly used documentation format is the one used by [[Erich Gamma]], [[Richard Helm]], [[Ralph Johnson (computer scientist)|Ralph Johnson]], and [[John Vlissides]] in their book ''[[Design Patterns]]''. It contains the following sections: *'''Pattern Name and Classification:''' A descriptive and unique name that helps in identifying and referring to the pattern. *'''Intent:''' A description of the goal behind the pattern and the reason for using it. *'''Also Known As:''' Other names for the pattern. *'''Motivation (Forces):''' A scenario consisting of a problem and a context in which this pattern can be used. *'''Applicability:''' Situations in which this pattern is usable; the context for the pattern. *'''Structure:''' A graphical representation of the pattern. [[Unified Modeling Language#UML Class Diagram|Class diagram]]s and [[Interaction diagram]]s may be used for this purpose. *'''Participants:''' A listing of the classes and objects used in the pattern and their roles in the design. *'''Collaboration:''' A description of how classes and objects used in the pattern interact with each other. *'''Consequences:''' A description of the results, side effects, and trade offs caused by using the pattern. *'''Implementation:''' A description of an implementation of the pattern; the solution part of the pattern. *'''Sample Code:''' An illustration of how the pattern can be used in a programming language. *'''Known Uses:''' Examples of real usages of the pattern. *'''Related Patterns:''' Other patterns that have some relationship with the pattern; discussion of the differences between the pattern and similar patterns.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Software design pattern
(section)
Add topic