Software design patterns

From Wikimedia Commons, the free media repository

Jump to: navigation, search

Design patterns is a general reusable solution to some commonly occurring problem in software design.

Contents

[edit] Creational patterns

Creational patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

[edit] Abstract factory

The abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme.

[edit] Factory method

the Factory method pattern deals with the problem of creating objects (products) without specifying the exact class of object that will be created.

[edit] Builder pattern

The Builder pattern separate the construction of a complex object from its representation so that the same construction process can create different representations

[edit] Prototype pattern

Prototype pattern is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects

[edit] More examples

  • Lazy initialization pattern is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed
  • Object pool is a set of initialised objects that are kept ready to use, rather than allocated and destroyed on demand
  • Singleton pattern restrict instantiation of a class to one object


[edit] Structural pattern

Structural Design Patterns ease the design by identifying a simple way to realize relationships between entities.

[edit] Adapter pattern

The adapter pattern adapts one interface for a class into one that a client expects

[edit] Bridge pattern

The bridge pattern decouple an abstraction from its implementation so that the two can vary independently.

[edit] Composite pattern

The composite pattern is a tree structure of objects where every object has the same interface.

[edit] More examples


[edit] Behavioral pattern

behavioral design patterns identify common communication patterns between objects and realize these patterns.

[edit] Strategy pattern

The strategy pattern defines a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

[edit] Template method pattern

The template method pattern describes the program skeleton of a program in an operation, deferring some steps to subclasses.

[edit] More examples


[edit] Concurrency pattern

Concurrency patterns are one of the types of design patterns. Examples of this class of patterns include:


[edit] Leaders followers pattern

Examples of this class of patterns include: