Design Patterns Series - Chapter One - Introduction

Introduction

 
Design patterns are the reusable solution of the issues that occur in software design. They are time-tested solutions so that we can reuse them in similar situations to ease our future run of the software systems.
 
These days, no system or software is rigid and keeps on changing very frequently, as there is always a need to implement new requirements in the system. So, the main goal of design patterns is to make this task (future changes implementation) easy and error free for the developers. All design patterns try to keep the modules of the system loosely coupled so that any changes in one module will not affect other modules and very minimal changes are required to include a new functionality or to change the functionality. Design patterns are programming language independent, which means they are just the pattern that can be followed in any programming language. By using the design patterns, you can make your code more flexible, reusable and maintainable.
 
Design patterns should be used whenever they are required in a system or you see a problem that can be solved by any of the design patterns. It’s not like you have to forcefully push design pattern while writing code, it should come naturally --  not forcefully.
 

Purpose

 
The purpose of this course is to understand usage of design patterns. That will make you more comfortable to use design patterns whenever they are required.
 

Types of Design Patterns

 
Creational Patterns
 
It is basically needed wherever you have to deal with an object creation problem. It helps to create objects suitable to the situation.
 
Structural Patterns
 
It eases the design by identifying a simple way to realize relationships among entities. Structural design patterns are concerned with how classes and objects can be composed.
 
These patterns focus on how the classes inherit from each other and how they are composed from other classes.
 
Behavioral patterns
 
These are all about Class object communication to each other. These design patterns are mainly used to improve the object communication with each other.
 
Please see the below figure for popular design patterns in all the three categories. We will discuss all of them one by one in upcoming chapters.
 

Summary

 
Design patterns are really very useful when you understand the actual use of them and practice  implementing the required design pattern in your system. I wrote this introduction blog separately just to give an idea of why, how and where to use design patterns.
 
References
 
https://sourcemaking.com/design_patterns