DEV Community

Cover image for Design Patterns in Software Development
Abdur Rehman Khalid
Abdur Rehman Khalid

Posted on

 

Design Patterns in Software Development

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

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

Latest comments (14)

Collapse
 
fersa profile image
Ferhat

Great article and very informative. And thank you for providing further materials. Some feedback for future entries: Check your text a couple of times before posting it.

I mean no ill will. I just found some typos in your text. If you improve that, the text will become much easier to read.

Keep on writing and sharing your knowledge. Have a great day :D

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Thank you for pointing that out, as I am moving forward I will be improving other mistakes alongside with the spelling and other grammatical mistakes.

Collapse
 
andradesampaio profile image
Andrade Sampaio

Thank you.

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Your Welcome

Collapse
 
zymawy profile image
Ironside

thank you for sharing good resources

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Thank you I hope that it would be very useful for you.

Collapse
 
bouscs profile image
bouscs

Awesome post, great idea to make a repo containing guides to all the different patterns!

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Thank you for appreciation means a lot.

Collapse
 
rizkytegar profile image
πŸŽ‰ Rizky Tegar Pratama

nice post

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Thank you.

Collapse
 
davidyaonz profile image
David Yao

Good starting point

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Thank you.

Collapse
 
elmerivincent profile image
Elmeri Keitaanranta

Well written!

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Thanks a Lot, it means a lot to me.

An Animated Guide to Node.js Event Loop

>> Check out this classic DEV post <<