JavaScript patterns can improve code reusability, maintainability, clarity, and efficiency. Additionally, these patterns can help increase code performance and compatibility with other libraries, making the developer more skilled and efficient.
-
IIFE (Immediately Invoked Function Expression)
- https://flaviocopes.com/javascript-iife/
- https://toddmotto.com/mastering-the-module-pattern/
- https://medium.com/@vvkchandra/essential-javascript-mastering-immediately-invoked-function-expressions-67791338ddc6
- http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html
- https://www.freecodecamp.org/news/javascript-modules-a-beginner-s-guide-783f7d7a5fcc
-
Callback
-
Observer
-
Singleton
- https://www.sitepoint.com/javascript-design-patterns-singleton/
- https://www.freecodecamp.org/news/singleton-design-pattern-with-javascript/
- https://www.digitalocean.com/community/conceptual-articles/singleton-design-pattern-in-javascript
- https://www.digitalocean.com/community/tutorials/js-js-singletons
- https://www.dofactory.com/javascript/design-patterns/singleton
-
Factory
-
Promises
-
Decorator
-
Prototype
- https://www.patterns.dev/posts/prototype-pattern
- https://ghost-together.medium.com/a-guide-to-prototype-based-class-inheritance-in-javascript-849d3c3ddca
- https://www.programiz.com/javascript/prototype
- https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes
- https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/this%20%26%20object%20prototypes/ch5.md
- https://dev.to/karataev/with-great-prototype-power-comes-great-responsibility-457m
- https://javascript.info/prototype-inheritance
- https://dev.to/karataev/javascript-prototypes-by-example-15jh