Design patterns

From GPWiki
Jump to: navigation, search

Design Patterns

A pattern is a distinct format for describing a proven solution to solving a general problem. Design patterns (DPs) are patterns specifically for software engineering.

Every pattern has the following characteristics:

  • A short descriptive name
  • A brief description of the context
  • A thorough description of the problem
  • A prescription for a solution


Programming Patterns

A programming pattern is a design pattern related solely to programming problems.

Behavioral patterns

  • Observer When an object changes state, other objects are notified
  • State Changing object behavior depending on the state of an object
  • Strategy Supplying different interchangeable variants of an algorithm in a class
  • Template method Supplying an algorithm in which sub-classes can redefine certain steps without changing the overall algorithm
  • Visitor Separating operations on an object from the object itself in an extendable way. The basis for "double dispatch".

Creational patterns

  • Singleton Implementing a class that has exactly one instance and a global point of access
  • Abstract Factory Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
  • Builder Implementing a class that builds parts of a complex object.

Structural patterns

  • Composite Combining several objects into an object that has the same behavior as its parts


Usability Patterns

A usability patterns deal with interfaces, human-computer interaction and related subjects.

  • Magnetism Making it easier and less frustrating to do precise targeting
  • Shield Preventing that a critical action is performed by accident
  • Context A single user command will perform the action appropriate to the context in which the command was issued


References


External Links