Design patterns in general helps you to implement standardized and efficient solutions to software design and programming problems. Design patterns are not pure inventions like a light bulb or a car. They are derived patterns that software engineers and architects found that could be standardized to be used to solve similar problems categorized across 3 major areas such as Creational, Structural and Behavioral. In this respect, Design patterns are often called time tested solutions for Object Oriented programming problems.
Identifying the right design pattern for the problem will help us to avoid costly changes, un-maintainable, complex and inefficient code as the system scales up. As I said before, design patterns comes along the way. We are all encouraged to abstract design patterns and create a library out of it if you feel that you have come up a re-suable solution that be used across your projects.
When we talk about design patterns, it is also important to understand the difference between the 3 commonly terms that are used interchangeably but actually are different – Design patterns, Architectural Patterns and Architectural Style.
As you can see above, Design Patterns are at the code level eg: Factory Pattern, which you can read and understand as a pseudo code or some kind of logic. Architectural Patterns deals with a level higher when we talk about components or block level diagrams that make up the systems for eg: MVC pattern where you are represent the system components as Model, View and Controller – a very high level view of the project repsented as block diagrams. Architectural Style are just principles or rules eg: REST, SMTP etc