Skip to content

Latest commit

 

History

History

patterns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Design Pattern's

Types of Design Patterns

Samples

Creational

Creational pattern design patterns provide ways to create objects while hiding the creation logic, instead of instantiating objects directly using the new operator. This gives the program more flexibility in deciding which objects need to be created for a given use case.

  1. Singleton
  2. Factory
  3. Abstract Factory

Structural

Structural pattern deals with class and objects composition. The concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionality.

  1. Adapter

Behavioral

Behavioral pattern are specifically concerned with communication between objects.

  1. Command

Motivation

Benefits

Design Pattern have two major benefits:

  1. Provide a way to solve issues related to software development using a proven solution. The solution facilities the development of highly cohesive modules and minimal coupling. They isolate the variability that may exist in the system requirements, making the overall system easier to understand and maintain
  2. Make communication between designers more efficient. Software professionals can immediately picture the high level design in their heads when they refer the name of the pattern used to solve a particular issue when discussing system design

Template

Term Description
Pattern Name Describes the essence of the pattern in a short, but expressive, name
Intent Describes what the pattern does
Also Known As List any synonyms for the pattern
Motivation Provides an example of a problem and how the pattern solves that problem
Applicability Lists the situation where the pattern is applicable
Scructure Set of diagrams of the classes and objects that depict the pattern
Participants Describes the classes and objects that participate in the design pattern and their responsabilities
Collaborations Describes how the participants collaborate to carry out their responsabilities
Consequences Describes the forces that exist with the pattern and the benefits, trade-offs, and the variable that is isolated by the pattern