Skip to content

exgael/design-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Design Patterns

This repository contains implementations of various design patterns. Below is a list of the design patterns included in this project:

Behavioral Patterns

  1. Chain of Responsibility

    • Allows an object to pass a request along a chain of potential handlers until the request is handled.
  2. Command

    • Encapsulates a request as an object, allowing parameterization of clients with queues, requests, and operations.
  3. Iterator

    • Provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
  4. Mediator

    • Defines an object that encapsulates how a set of objects interact, promoting loose coupling by keeping objects from referring to each other explicitly.
  5. Memento

    • Captures and externalizes an object's internal state so that the object can be restored to this state later without violating encapsulation.
  6. Observer

    • Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
  7. State

    • Allows an object to alter its behavior when its internal state changes, appearing to change its class.
  8. Strategy

    • Defines a family of algorithms, encapsulates each one, and makes them interchangeable, allowing the algorithm to vary independently from clients that use it.
  9. Template Method

    • Defines the skeleton of an algorithm in a method, deferring some steps to subclasses, allowing them to redefine certain steps without changing the algorithm's structure.
  10. Visitor

    • Represents an operation to be performed on elements of an object structure, allowing new operations to be defined without changing the classes of the elements on which it operates.

Each pattern is implemented with clear and concise examples to demonstrate its usage and benefits. Feel free to explore and use these patterns in your own projects.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages