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
- How to properly create a Class
- How to instantiate an Object
- How to interact between Objects
- How to write loosely coupled code
- How to write reusable code
What are the benefits of design patterns?
There are several benefits of using design patterns. Some of them are:
- Robust code
- Code reusability
- Highly maintainable
- Loosely coupled application
What are the types of design patterns?
- Structural: Deals with the structure of a class
- Creational: Deals with the best way to create objects
- Singletone design pattern
- Factory design pattern
- Bridge design pattern
- Behavioral: Ways for class/objects to communicate with each other