Published on

Design Patterns

Authors
  • avatar
    Name
    Iraianbu A
    Twitter

Introduction

Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code. The idea was picked up by four authors: Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm. In 1994, they published Design Patterns: Elements of Reusable Object-Oriented Software, in which they applied the concept of design patterns to programming.

Classification of Design Patterns

Design patterns differ by their complexity, level of detail and scale of applicability. In addition, they can be categorized by their intent and divided into three groups.

  • Creational patterns
  • Structural patterns
  • Behavioral patterns

Creational Patterns

Creational patterns provide object creation mechanisms that increase flexibility and reuse of existing code.

  • Singleton
  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype

Structural Patterns

Structural patterns explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

Behavioral Patterns

Behavioral patterns take care of effective communication and the assignment of responsibilities between objects.

  • Chain of Responsibility
  • Command
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State

References