├── .gitignore └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .idea 4 | *.iml 5 | *.ipr 6 | *.iws 7 | atlassian-ide-plugin.xml 8 | /.project 9 | test/temp/ 10 | *debug.log* 11 | .vscode 12 | .mvn 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # design-patterns 2 | JavaScript(Vanilla/ES6/TypeScript) and Java (GoF) design patterns 3 | 4 | A design pattern is a general repeatable/reusable solution to a commonly occurring problem with a given context in software design. It can be treated as a description or template for how to solve a problem that can be used in many different situations. 5 | 6 | ## Creational 7 | 8 | - Singleton 9 | - Factory Method/Factory 10 | - Abstract Factory 11 | - Builder 12 | - Prototype 13 | 14 | ## Structural 15 | 16 | - Adapter 17 | - Bridge 18 | - Composite 19 | - Decorator 20 | - Flyweight 21 | - Proxy 22 | - Facade 23 | 24 | ## Behavioral 25 | 26 | - Chain of Responsibility 27 | - Command 28 | - Interpreter 29 | - Iterator 30 | - Mediator 31 | - Memento 32 | - Observer 33 | - State 34 | - Strategy 35 | - Template Method 36 | - Visitor 37 | 38 | ## Backend communication design patterns 39 | 1. Request response 40 | 2. push 41 | 3. short polling 42 | 4. long polling 43 | 5. Server Sent Events 44 | 6. Publish Subscribe(Pub/Sub) 45 | 7. Multiplexing and Demultiplexing 46 | 8. Stateful and Stateless 47 | 9. Sidecart pattern 48 | 49 | --------------------------------------------------------------------------------