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.
- Erich Gamma
- John Vlissides
- Ralph Johnson
- 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
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?
- Using a Design Pattern specific to any problem can improve the overall documentation and design of project.
- Using a Design Pattern can help to build effective software with usability increased to many folds.
Components of Design Pattern
- Name: The name of the Design Pattern includes the problem and it's solution.
- Problem: What kind of problem the specific design pattern will solve.
- Solution: What is the solution of specific problem.
- 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:
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 Design Patterns refer to the control the creation of specified objects or classes.
Structural Design Patterns refer to making a very specific structure of the classes or interfaces.
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)
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
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.
thank you for sharing good resources
Thank you I hope that it would be very useful for you.
Awesome post, great idea to make a repo containing guides to all the different patterns!
Thank you for appreciation means a lot.
Good starting point
Thanks a Lot, it means a lot to me.