|object-oriented software technology|
|object-oriented analysis (OOA)|
|object-oriented Design (OOD)|
|object-oriented programming (OOP)|
|Unified Modeling LANGUAGE (UML)|
|Unified Process (UP)|
a draft sample (English. Design pattern) describes a proven template forDraft problem. It represents thereby a re-usable collecting main for problem solution. Developed the expression in architecture, of where it was taken over for the software development. In the last years the beginning of the draft samples has also increasing interest within the rangethe people computer interaction found.
To table of contents
The architect Christopher Alexander had arranged a collection of draft samples into the 1970er years. In architecture this idea spread by far not in such a way however as later in the software development. Kent Beck and Ward Cunningham seized 1987 thoseIdeas Alexanders from architecture up and developed draft samples for the production of graphic use interfaces in Smalltalk. One year later began Erich gamma with its graduation at the University of Zurich over the general transmission of this method on the software development.Parallel to it James Coplien worked in the years 1989 to 1991 on sample-similar Idiomen for [[C++]] and published 1991 its book Advanced C++ Idioms. Erich gamma terminated his graduation in the same year and went in the connection into the united ones States by America, where it together with smelling pool of broadcasting corporations helmet, Ralph Johnson and John Vlissides the book Design Patterns - element OF Reusable Object Oriented software brought out, in which 23 draft samples are described. These four authors are among developers alsounder its pointed name course OF Four (Viererbande, briefly GoF) admits and help with their book to the draft samples to their break-through. Occasionally GoF is used also as reference for the mentioned book.
the primaryUse a draft sample lies in the description of a solution for a certain class of draft problems. Further use results from the fact that each sample has a name. This simplifies the discussion among software developers, there one abstractly over a software structureto speak can. So draft samples - contrary to Idiomen - are first of all independent of the concrete programming language.
If the employment is documented by draft samples, a further use arises as a result of the fact that by the description of the sample a purchase todiscussion of the problem context and the pro and cons of the solution one manufactures.
the description of a draft sample by the course OF Four follows the following pattern:
- Name and classification of the sample.
- Purpose of the sample.
- Synonymous one:Other well-known names of the sample.
- Motivation: (Rear) of reasons for the employment of the sample.
- Applicability: Areas of application for the sample.
- Structure: Description of the general structure of the sample.
- Took part participants: Classes, which are involved in the sample.
- Interaction of the classes involved.
- Consequences:Which preand there are disadvantages?
- Implementation: Practice-relevant Tipps, cheat and to techniques as well as warning of errors, which can happen easily.
- Example code: Source code fragment, which shows the employment of the sample.
- Practical application: Where is the sample already used?
- Cross references:As the sample with others playsExamine together?
Generally the documentation of a draft sample should make sufficient information available about the problem, which treats the sample, over the context of application and over the suggested solution. Many authors lean their structure to that of the descriptions the course OFFour on and adapt them to their needs.
the course OF Four classifies samples according to the two criteria of the purpose (PUR-float) and the range, which they affect (scope).
After the purposethe respective sample differentiate between they three classes: The first group of the production samples refers to the production of objects. Thus one can want to control about the number of produced objects of a class, or one wants the concrete type of the producedObjects - dependent on the respective conditions - adapt. The second group covers structure samples, which are to make a simplification for the structure possible between classes. Complex relations networks can be simplified for example over mediating classes or interfaces logically. The third group that Behavior pattern concerns the behavior of the classes. Here it concerns the largest group of samples. They refer to co-operation and the interaction of classes.
According to their range of application sample can be divided in class and object samples. Class samples describeRelations between classes and develops with priority leaving structures. The structures are fixed thereby to the translation time. However object samples use with priority associations and aggregations for the description of relations between objects. The structures between objects, described by it, are at run-time dynamically alterable.
production samples (Creational Patterns)
production sample abstract object production processes. Class samples use transmission in order to vary the class of the object which can be produced. Object samples delegate the object production to other objects.
- Class sample
- factory method (Factory Method, Virtual Constructor)
- object sample
structure samples (Structural Patterns)
structure sample combine classes and objects into larger structures. Class samples summarize thereby interfaces and implementations, while object samples arrange objects in a structure. By class sample described structuresare fixed to the translation time. The structures described by object samples are at run-time alterable.
- Class sample
- adapter (adapter, Wrapper) (adapter with transmission or class adapter)
- object sample
behavior patterns (Behavioral Patterns)
behavior pattern describe the interaction between objects and complex supervisory data flow. Class samples divide control for different classes, object samples use aggregations.
- Class sample
- interpreter (interpreter)
- template method (Template Method)
- object sample
- competence chain (chain OF Responsibility)
- command (COMMAND, Action, Transaction)
- Iterator (Iterator, cursor)
- mediator (Mediator)
- Memento (Memento, token)
- observer (Observer, dependency, Publish Subscribe, Listener)
- condition (State, Objects for States)
- strategy (Strategy, Policy)
- visitor (Visitor)
- Plugin (Plugin)
othersKinds of samples
the work the course OF Four have many authors to further publications lively. From this also the problem developed that a sample cannot be classified any longer easily than draft samples. Rather it gives among other things gradual differences inthe grit of samples. Thus for instance the Model View CONTROLLER becomes - sample (MVC) of some as architecture samples, of others (still) than draft samples regards.
Examples of kinds different of draft samples from samples are:
- Analysis samples characterize typical cases of the requirement analysis.
- Architecture sample describe typical software architectures.
- Idiome are below the level of the draft with programming arising samples.
- Communication samples refer to the communication ways between persons of an organization.
- Organization samples describe elements of the structures of organizations.
- Anti-samples describe, “like one it do not makeshould. “
- Christopher Alexander, Sara Ishikawa, Murray Silverstein, max of Jacobson, Ingrid Fiksfahl King, Shlomo fishing rod: A sample language. Cities, building, construction. Loosely, Vienna 1995, ISBN 3-85409-179-6
- January Borchers: A Pattern Approach ton of Interaction Design. John Wiley & Sons, Chichester 2001, ISBN 0-471-49828-9
- franc shrub man, Regine Meunier, Hans's raw mink, Peter Sommerlad, Michael Stal: Pattern oriented software architecture. A Pattern system. Addison Wesley Longman, Bonn 1998, ISBN 3-8273-1282-5
- James O. Coplien: Advanced C++ Programming Styles and Idioms. Addison Wesley, 1991, ISBN 0-2015-4855-0
- Martin Fowler, David Rice, Matthew Foemmel: Patterns for Enterprise Application architectures. Mitp publishing house, 2003, ISBN 3-82661-378-3
- Erich gamma, smelling pool of broadcasting corporations helmet, Ralph Johnson, John Vlissides: Draft sample. Elements of re-usable object-oriented software.Addison Wesley, Bonn 1996, ISBN 3-89319-950-0
- Erich gamma, smelling pool of broadcasting corporations helmet, Ralph Johnson, John Vlissides: Design Patterns. Element OF Reusable Object Oriented software. Addison Wesley, 1995, ISBN 0-201-63361-2
- Douglas Schmidt, Michael Stal, Hans's raw mink, franc shrub man: Pattern oriented software architecture. Sample for concurrent andinterlaced objects. dpunkt, Heidelberg 2002, ISBN 3-89864-142-2
Web on the left of
- the articles of Beck and Cunningham (English)
- the Wikiprinzip from the point of view the draft sample beginning explains (English)
- sample book (English) to Patterns in
- Java (English)
- Design Patterns in C# with SOURCE code(English)
- Patterns in PHP (English)
- Design Patterns - overview with different left (English)