Try design patterns in typescript.
It is (should be) also a demo for a pure ts
app with:
- a step to typescript's interface/typing features
- a consistent code style
- a linter (eslint)
- a formatter (prettier)
- a test framework (jest)
- a githook management (husky)
This repo might contain demos for other libraries.
TOC:
- overall relations
- each pattern with UML
- for each patterns, adding comparisons with other patterns
- Adapter
- with a handbook mixins example
- Bridge
- Decorator
- with a example of
ts
experimental decorator annotation
- with a example of
- Facade
- Composite
- Flyweight
- Proxy
- S.O.L.I.D Principles
- Single Responsibility Principle
- every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class, module or function
- Open/Closed Principle
- software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
- Single Responsibility Principle
- Anit-pattern
- a common response to a recurring problem that is usually ineffective and risks being highly counterproductive
- God Object
- an object that knows too much or does too much