Design Pattern Slide:

What is the design pattern in computer science?

In computer science, a design pattern is a reusable solution to a common problem encountered in software design.

Why do we need a design pattern?

We need design patterns to solve common coding problems

  1. How to properly create a Class
  2. How to instantiate an Object
  3. How to interact between Objects
  4. How to write loosely coupled code
  5. How to write reusable code

What are the benefits of design patterns?

There are several benefits of using design patterns. Some of them are:

  1. Robust code
  2. Code reusability
  3. Highly maintainable
  4. Loosely coupled application

What are the types of design patterns?

  1. Structural: Deals with the structure of a class
  2. Creational: Deals with the best way to create objects
    1. Singletone design pattern
    2. Factory design pattern
    3. Bridge design pattern
  3. Behavioral: Ways for class/objects to communicate with each other