(Intro)Design Pattern Tutorial Part-1
What is Design Pattern?
It is like a blueprint to solve a particular problem in your code. or a solution to software design problems. Don’t think of patterns with an Algorithm.
Algorithm: Sets of instructions to achieve the result/goal.
Design Pattern: High-level description of your program. Meaning: You cannot just copy a pattern to your program but we can follow the pattern that works best for our program and implement it accordingly
Confused? We will deep dive into it step by step.
Right now just remember:
- The solution to a common software design problem(Industry-standard approach).
- Make code structured, easy to understand, test and debug.
- Provide reusability of code to solve recursively (occur again) problems.
- Communicate easily with your teammates. ” Parrot: Hey you can use the Singelton for this problem. Owl: Ohh thanks you saved me” lolz. So the other team member just simply understands by a Word, what to do.
Facts: There are developers who are not familiar with design patterns but they are using them like 99% chances you have used Singleton Pattern.
Categories of Design Pattern:
- Creational patterns: Provides a solution to create an object to provide flexibility and reusability of code for a specific solution.
- Structural patterns: Provides a way to create a flexible and efficient large structure i.e create a large object from small objects
- Behavioral patterns: Provides a loose coupling & flexibility by better communication between objects.
Now in the next tutorial, we will learn Creational patterns
Connect with me : Linkedin