Skip to main content

Design Patterns

"Design patterns are standardized solutions to common problems in software design. Essentially, they are templates for how to solve a problem in a way that has been proven to work.

Why Use Design Patterns?

  • By using design pattenrns, you can avoid reinventing the wheel. They provide a proven solution that can be reused in different projects.
  • Patterns streanline the development process by providing a clearn structure, which can save time and reduce errors.
  • Patterns provide common language for developers to understand structure and intent of the code.
  • Code that follows design patters is often easier to read and maintain.

Classifications of Design Patterns

Creational Patterns

Provides object creation mechanisms that increase flexibility and reuse of existing code

Structural Patterns

Explains how to assemble objects and classes into larger structures, while keeping these structures flexible and efficient.

Behavioral Patterns

Takes care of efficient communication and the assignment of responsibilities between objects.

References

Refactoring guru has excellent explanations on design patterns. https://refactoring.guru/design-patterns