Skip to content

A GitHub repository providing simple explanations and code snippets for various design patterns in JavaScript and Python.

Notifications You must be signed in to change notification settings

simon-das/design-patterns

Repository files navigation

Design Patterns

Design patterns are general repeatable solutions to common software development problems. They represent established best practices and can help in achieving software that is more maintainable, understandable, and scalable.

A design pattern isn't a finished design that can be transformed directly into code. Rather, it's a description or template for how to solve a problem that can be used in many different situations.

There are various types of design patterns, including creational patterns, structural patterns, and behavioral patterns. Creational patterns focus on the process of object creation and provide mechanisms for creating objects in a manner suitable to the situation. Structural patterns deal with object composition to form larger structures, while behavioral patterns focus on communication between objects, encapsulating behavior in objects to allow for flexibility in behavior.

This repository contains explanations of the following design patterns.

  1. Singleton
  2. Factory
  3. Abstract Factory
  4. Adapter
  5. Decorator
  6. Facade
  7. Observer
  8. Command