Skip to content

pncsoares/javascript-design-patterns

Repository files navigation

Design Patterns

Design patterns written in JavaScript and TypeScript.

Definition

A software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design. Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.

👆 Source

In my opinion, this defines very well what a design pattern is.

Advantages of using them

  • Promote easier changes
  • Turns the objects reusable
  • Keeps objects small and specialized

Types

  • Creational patterns
  • Structural patterns
  • Behavioral patterns
  • Concurrency patterns

Code examples

Type Name Information
Creational patterns Builder Go to detail 📄
Creational patterns Singleton Go to detail 📄
Structural patterns Facade Go to detail 📄
Behavioral patterns Command Go to detail 📄
Behavioral patterns Null Object Go to detail 📄

Another design patterns that I will add in the future:

  • Factory
  • Observer
  • Decorator
  • Strategy
  • Adapter
  • Iterator
  • Proxy
  • Composite
  • Bridge

Setup

Clone repository

Create and go to the directory where you want to place the repository

  cd my-directory

Clone the project

  git clone https://github.com/pncsoares/javascript-design-patterns.git

Go to the project directory

  cd javascript-design-patterns

License

MIT

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy