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.
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
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.
- 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.
- 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.
There exists following types of Design Patterns:
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 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