Design patterns are a relatively new concept to engineering. Formulated by Christopher Alexander in 1977 [1], they didn’t become very widespread in the software engineering discipline until 1994, when a few coders standardized on the ”Gang of Four” so-called primary design patterns that every coder should use.

What are design patterns?

Design patterns are widely-accepted software architectures that help you solve a wide variety of recurring problems in developing an application. Put another way: design patterns show you how to create relationships between classes and objects to come up with a more or less optimum way to engineer a solution.

What are they useful for?

  1. Ease of Development — Learning design patterns will help you design top-notch architectures by using time-proven”’ and peer-reviewed strategies.
  2. More Efficient Communication — So you want a web site where the HTML is separate from the code? You are asking for a Model View Controller pattern (MVC).
  3. Sign of Professionalism — Vanishingly few amateur programmers even know what design patterns are, while practically every seasoned engineer does. Because of this, ”’design patterns are great to mention during job interviews!”’
  4. Focus on Scenarios — Many times we can’t see the forest for the trees. By thinking in terms of design patterns, we can more accurately see what we’re trying to do and more easily figure out how we’re going to get there.
  5. Aids in Comprehension — It can take hours, even days, to reverse engineer thousands of lines of code. But by labeling each design pattern a class is using or a member of, engineers skilled in design patterns can comprehend the overall system in a matter of minutes.

Types of Design Patterns

There are four major types of design patterns:

  1. Creational Patterns aid in the creation of *objects.
  2. Structural Patterns aid in the creation of complex and usable relationships between objects.
  3. Behavioral Patterns aid in common communication strategies between objects.
  4. Architectural Patterns aid in common high-level design strategies on an application or library level.