Design Patterns in Software Development
Tags: tutorial, opensource, productivity, community
Published: 2022-10-22 19:03:20

If you have worked with the enterprise level softwares or any legacy software than you already know that there exists a specific programming pattern (Design Pattern) to solve a specific problem. If you are getting started with your software career than it is a sure thing that in the near future or at any stage of your career you will work with at-least one of the Software Design Pattern.

Due to huge importance of Design Pattern in software development, I was very much interested to spread my knowledge regarding Design Patterns to as much people as possible. In this article we will be looking at what are Design Pattern and how a Design Pattern can be studied as well.

## What is a Design Pattern?
Now, if you have not heard of Design Patterns, then it is a sure thing that you can be a bit intimidating but it is just a process of understanding some very basic things. Now, let's come to the point, four software engineers sat together and observed mostly common ways used to solve often occurring problems and documented them in a very effective way and called them _Design Patterns_. 

Now, there comes another question, how were those four software engineers, so let's answer this question as well.
1. Erich Gamma 
2. John Vlissides 
3. Ralph Johnson
4. Richard Helm
The above persons are called the *Gang of Four* who are responsible behind the writing the book called **Design Pattern Elements of Reusable Object-Oriented Software**

![GangOfFour](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dg3u2rs21a03df221mt6.png)

### Purpose of Design Patterns
Design Patterns plays a very important role in the Object Oriented Software Design. Each level of enterprise application has some kind of Design Pattern Implementation. Design Patterns Helps to Create More Reusability Friendly Code that is easy to handle.

## Why Design Patterns are Required?
1. Using a Design Pattern specific to any problem can improve the overall documentation and design of project.
2. Using a Design Pattern can help to build effective software with usability increased to many folds.

## Components of Design Pattern
1. Name: The name of the Design Pattern includes the problem and it's solution.
2. Problem: What kind of problem the specific design pattern will solve.
3. Solution: What is the solution of specific problem.
4. Consequences: What will be the consequences in terms of space and time complexity etc.

## Main Classes of Design Patterns
There exists following types of Design Patterns:
1. Creational
2. Structural
3. Behavioral

## Introduction to the Classes
We know what types of classes exists in the Design Pattern so let's have a brief introduction of the each class.


### Creational
Creational Design Patterns refer to the control the creation of specified objects or classes.

### Structural
Structural Design Patterns refer to making a very specific structure of the classes or interfaces.

### Behavioral
Behavioral Design Patterns refer to control the behavior of the Classes, Objects or Interfaces.

# Learning the Design Patterns
Learning Design Patterns is not just writing code, it contains the understanding of Class Diagrams, and understanding the connection of each class or interface with each other.

Design Patterns can be learned from the book **Design Pattern Elements of Reusable Object-Oriented Software** very effectively.

I have created an open source project that contains the very information of the each Design Pattern alongside with the Java code implementation. This repository is not complete but it will be completed soon. If you want to contribute, then you can implement each Design Pattern in other programming languages as well.
[Design Patterns Repo on GitHub](https://github.com/AbdurRKhalid/Design-Patterns)