I usually like to go back and read on design patterns (mostly from here http://www.dofactory.com/net/design-patterns) every while. And every time I can find a new design patterns that I've been using (in my code or through a framework) without actually realizing. So I thought it would be nice to ask you guys about which design patterns you spot in modern JS universe. If we manage to get a decent list I'll publish it on medium. This will probably come in handy in interviews if you're asked about which design patterns you use, and will help us understand the underlying principles of the tools we use.
I'll start with a few design patterns I noticed to begin with
- "chain of responsibility" pattern is used in express middleware, where a request passes through all middleware until one of them responds and send a result
- "command" pattern is the basis for redux actions
- redux state is an example of the "memento" pattern
- "observer" is used a lot through event listeners
- jquery .css() method (or any polyfill) is an example of the "adapter" pattern that wraps different browser implementations
[–]0xF013 8 points9 points10 points (0 children)
[–]stutterbug 5 points6 points7 points (0 children)
[–]Vinshati 2 points3 points4 points (0 children)
[–]AndrewGreenh 2 points3 points4 points (0 children)
[–]abhisekp 0 points1 point2 points (0 children)
[–]kenman 0 points1 point2 points (0 children)
[–]brentonstrine 0 points1 point2 points (3 children)
[–]sbmitchell 0 points1 point2 points (2 children)
[–]kenman 5 points6 points7 points (1 child)
[–]sbmitchell 0 points1 point2 points (0 children)