An open API service indexing awesome lists of open source software.

https://github.com/dancastillo/js-design-patterns


https://github.com/dancastillo/js-design-patterns

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Design Pattern

## Strategy Pattern
[Wikipedia Definition](https://en.wikipedia.org/wiki/Strategy_pattern) - a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, code receives run-time instructions as to which in a family of algorithms to use

[Example Code](./strategy/index.js)

#### Video Reference
* [Strategy Pattern - Christopher Okhravi](https://www.youtube.com/watch?v=v9ejT8FO-7I&list=PLrhzvIcii6GNjpARdnO4ueTUAVR9eMBpc&index=3)
* [Nothing is Something](https://www.youtube.com/watch?v=OMPfEXIlTVE)

## Null Object Pattern
[Wikipedia Definition](https://en.wikipedia.org/wiki/Null_object_pattern) - an object with no referenced value or with defined neutral ("null") behavior. The null object design pattern describes the uses of such objects and their behavior (or lack thereof).

[Example Code](./nullObject/index.js)

#### Video Reference
* [Null Object Pattern - Christopher Okhravi](https://www.youtube.com/watch?v=rQ7BzfRz7OY&list=PLrhzvIcii6GNjpARdnO4ueTUAVR9eMBpc&index=19)
* [Null Object Pattern - Web Dev Simplified](https://www.youtube.com/watch?v=D4Dja5WSZoA)

## Observer Pattern
[Wikipedia Definition](https://en.wikipedia.org/wiki/Observer_pattern) - is a software design pattern in which an object, named the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods.

[Example Code](./observer/index.js)

#### Video Reference
* [Observer Pattern - Christopher Okhravi](https://www.youtube.com/watch?v=_BpmfnqjgzQ&list=PLrhzvIcii6GNjpARdnO4ueTUAVR9eMBpc&index=3)
* [Javascript Observer Pattern - DevSage](https://www.youtube.com/watch?v=45TeJEmcqk8)