A design pattern is a general repeatable solution to a commonly occurring problem in software design in software engineering.
A design pattern isn’t a finished product that can be coded right away. It’s an explanation or blueprint for solving a problem that can be applied to a variety of problems.
Design Patterns are ways of expressing solid architectures that are reusable, extensible and industry standard. The concepts of design patterns are usable and understandable in any language and any environment. It may be browser, android, IOS, server, some Game engine, etc the design pattern will help you travel from a Framework consumer to a framework creator.
Design patterns are an Elegant Solution to repeating problems in software design.
- A few months of programming experience.
- Familiarity with Object-Oriented principles.
- Building reusable and extensible object-oriented software
- The Art of Designing Object-Oriented Software
Understanding design patterns helps us communicate with other developers on a more abstract level.
Design Patterns — Elements of Reusable Object-Oriented Software by Gangs of Four(GoF)
This book includes 23 design patterns in 3 categories.
- Creational patterns: Different ways to construct an object are the focus of creational patterns.
- Structural patterns: The relationship between these objects is the subject of structural patterns.
- Behavioural patterns: The interaction/communication of these objects is the subject of behavioural patterns.
Learning Design Patterns gives us the capability to Think in Objects!
Creational design patterns
These design patterns are all about class instantiation. This pattern can be further subdivided into patterns for creating classes and patterns for creating objects. Although class-creation patterns make good use of inheritance in the instantiation process, object-creation patterns make good use of delegation.
- Abstract Factory
- Factory Method
- Object Pool
Structural design patterns
These design trends are all about combining classes and objects. Inheritance is used in structural class-creation patterns to compose interfaces. Structural object patterns describe how to put objects together to create new features.
- Private Class Data
Behavioural design patterns
The contact of Class’s artefacts is the focus of these design patterns. Behavioural trends are those that are most associated with object communication.
- Chain of responsibility
- Null Object
- Template method
This article should have given you a good introduction to the Design Patterns and how important it is to have good knowledge about them. There’s still a lot to learn about them, but I hope you now feel comfortable diving in and experimenting with a wide range of powerful utilities on your own.
Please let me know if there was something you didn’t understand or if there’s something else you’d like to see in this or a future post. If you want to talk about something, feel free to contact me at any time. I would be more than happy if you send your feedback, suggestions.
Thanks a lot for reading till the end. You can contact me in case if you need any assistance: