# tcorral/design-patterns-in-javascript

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tcorral-design-patterns-in-javascript).**

2,623 stars · 522 forks · JavaScript

## Links

- GitHub: https://github.com/tcorral/Design-Patterns-in-Javascript
- Homepage: http://tcorral.github.com/Design-Patterns-in-Javascript/
- awesome-repositories: https://awesome-repositories.com/repository/tcorral-design-patterns-in-javascript.md

## Description

This repository serves as a reference for implementing standard software design patterns within JavaScript environments. It provides a collection of structural, creational, and behavioral patterns designed to assist developers in organizing complex application logic and improving overall code maintainability.

The project demonstrates how to apply object-oriented principles to decouple object creation from core business logic and manage communication between objects. By utilizing these patterns, developers can structure classes and object interactions to ensure code remains modular and flexible as project requirements evolve.

The collection covers a range of architectural techniques, including singleton instance management, factory instantiation, and class composition. It also includes examples of behavioral and structural patterns such as observers, strategies, and decorators, which allow for dynamic extension of functionality and the swapping of algorithms at runtime.

## Tags

### Software Engineering & Architecture

- [JavaScript Implementations](https://awesome-repositories.com/f/software-engineering-architecture/design-pattern-collections/javascript-implementations.md) — Serves as a reference collection of structural, creational, and behavioral design patterns implemented in JavaScript.
- [Design Pattern Implementations](https://awesome-repositories.com/f/software-engineering-architecture/design-pattern-implementations.md) — Provides a comprehensive collection of structural, creational, and behavioral design pattern implementations for modern JavaScript. ([source](https://github.com/tcorral/design-patterns-in-javascript#readme))
- [Architectural Design Patterns](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns.md) — Applies architectural design patterns to organize complex JavaScript application logic.
- [Behavioral Design Patterns](https://awesome-repositories.com/f/software-engineering-architecture/behavioral-design-patterns.md) — Coordinates object communication and responsibility assignment using behavioral design patterns. ([source](http://tcorral.github.com/Design-Patterns-in-Javascript/))
- [Creational Design Patterns](https://awesome-repositories.com/f/software-engineering-architecture/creational-design-patterns.md) — Separates instantiation logic from application flow using creational design patterns. ([source](http://tcorral.github.com/Design-Patterns-in-Javascript/))
- [Decorator Patterns](https://awesome-repositories.com/f/software-engineering-architecture/decorator-patterns.md) — Demonstrates the decorator pattern to dynamically extend object functionality without modifying source code.
- [Factory Patterns](https://awesome-repositories.com/f/software-engineering-architecture/dynamic-object-instantiation/factory-patterns.md) — Provides factory pattern implementations to decouple object instantiation logic from core business code.
- [Instance Management](https://awesome-repositories.com/f/software-engineering-architecture/instance-management.md) — Provides singleton pattern implementations to ensure shared instance management throughout the application lifecycle.
- [Object-Oriented Structural Organization](https://awesome-repositories.com/f/software-engineering-architecture/object-oriented-structural-organization.md) — Demonstrates object-oriented class composition techniques to organize code into modular and reusable structures.
- [Observer Patterns](https://awesome-repositories.com/f/software-engineering-architecture/observer-patterns.md) — Implements the observer pattern to establish subscription mechanisms for state changes between decoupled objects.
- [Object Oriented Design](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/foundational-theory-and-guidance/software-architecture-concepts/object-oriented-design.md) — Structures classes and object interactions using object-oriented design principles.
- [Strategy Patterns](https://awesome-repositories.com/f/software-engineering-architecture/strategy-patterns.md) — Implements the strategy pattern to allow for interchangeable algorithms at runtime.
- [Structural Design Patterns](https://awesome-repositories.com/f/software-engineering-architecture/structural-design-patterns.md) — Composes classes and objects into efficient structures using structural design patterns. ([source](http://tcorral.github.com/Design-Patterns-in-Javascript/))

### Education & Learning Resources

- [Software Architecture Guides](https://awesome-repositories.com/f/education-learning-resources/software-architecture-guides.md) — Acts as a guide for developers to decouple object creation and manage communication in large-scale codebases.
