Saturday, December 22, 2007

About Patterns


Patterns
:

A design pattern describes a problem and the design of a generic solution for that problem. A pattern doesn't provide an implementation. Patterns are typically at a higher level of reuse than templates. Design patterns in software were influenced by the building and urban planning architectural patterns of Christopher Alexander

An actual instance of a pattern will take into account specific concerns. Often the system architecture combines patterns, so that a collaborating set of classes may actual embody two or more patterns.
Originally, patterns addressed common idioms in the world of OO design and implementation. Patterns have begun to be used in other areas, in particular analysis patterns are being used to describe common idioms at the business analysis level.

Patterns are described with a template that typically looks likes this:

Name and Classification - choose a good name as it will enter the vocabulary

Intent - short statement about what it does, its rationale, and intent, and the issue it addresses.
Also Known As - other well-known names, if any.

Motivation - a concrete example that illustrates a problem and how the pattern solves the problem.

Applicability - where can it be applied and how do you recognize when it can be applied.

Structure - graphical OO model of the pattern.

Participants - participating classes or objects and their roles and responsibilities.

Collaborations - how they collaborate to carry out responsibilities.

Issues and Consequences - what are trade-offs associated with the pattern, what dependencies does it create.

Implementation - hints, pitfalls, and techniques.

Sample Code - clarifying examples of language dependent issues.

Known Uses - evidence of pattern use from real systems.

Related Patterns - similar patterns and their differences, other patterns that work with this one.

No comments: