Skip to content

Latest commit

 

History

History

Section 01 - Understanding Design Patterns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Section 01: Understanding Design Patterns

What is Design Pattern

We'll often observe the same problem occurring over and over again when developing software. Design Patterns are well-known solutions to those recurring problems and widely accepted by community.

  • The concept of design patterns is create by the building architect Christopher Alexander.
  • The idea of design patterns got more popular by the publication of the book "Design Patterns: Elements of Reusable Object-Oriented Software (1984)" by Gang of Four (GoF).


Types of Design Patterns

There are mainly three different types of design patterns.

  • Creation Patterns are used to create objects in a systematic way.
  • Structural Patterns establishes useful relationships between software components in certain configurations.
  • Behavioral Patterns are the best practices of objects interaction.


Design Patterns and Object-Oriented Programming (OOP)

Some important object-oriented mechanisms and concepts are used to develop those design patterns.

  • Polymorphism is often used in the Creational Patterns.
  • Structural Patterns take advantage of Inheritance a lot.
  • Behavioral Patterns heavily use methods and their signatures.
  • Interfaces are used across all these different types of design patterns.

Object-Oriented Programming (OOP) Concepts



The Design Pattern Context

A pattern context consists of the following:

  • Participants refer to the classes involved to form a design pattern. These classes involved in the design pattern, they play a different roles to accomplish the goals of the design pattern.
  • Quality Attributes refer to these nonfunctional requirements such as usability, modifiability, reliability, performance, and so on. Quality attributes have an impact on the entire software, and these quality attributes are typically addressed only by the architectural solutions.
  • Forces are various factors or trade-offs you consider when you're trying to adopt a particular design pattern. These forces are typically manifested in quality attributes such as modifiability, usability, reliability, performance, etc.
  • Consequences