Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/erickwendel/10-design-patterns-for-js

code examples of my 10 must-know design patterns for JavaScript Developers talk
https://github.com/erickwendel/10-design-patterns-for-js

builder-pattern design-patterns javascript node-test-runner nodejs refactoring-exercise test testing

Last synced: 3 days ago
JSON representation

code examples of my 10 must-know design patterns for JavaScript Developers talk

Awesome Lists containing this project

README

        

# 10-design-patterns-for-js

Hi there! This is the repo containing the code examples from my **10 must-know design patterns for JavaScript Developers** talk.

First of all, leave a star in this repo ⭐️

You'd also check out the [slides presentation](https://bit.ly/10-design-patterns-for-js-devs) and soon I'll update this repo with the video presenting all the tips.

## Running Examples

Each folder represents a step-by-step refactoring of an application to use the Design Patterns I show in this talk.

- [api](./api) - This is the API required to run all projects
- [app-pt00-initial-code](./app-pt00-initial-code) - Initial code with bad practices
- [app-pt01-n-tier-factory-dependency-injection](./app-pt01-n-tier-factory-dependency-injection) - splits the application code into different responsibilities and uses dependency injection
- [app-pt02-abstract-factory-builder](./app-pt02-abstract-factory-builder) - uses the abstract factory to create an application that runs in both terminal and web and uses the builder design pattern to build the CLI UI
- [app-pt03-test-data-builder](./app-pt03-test-data-builder) - uses the test data builder design pattern to create modular tests
- [app-pt04-observer-decorator-observer](./app-pt04-observer-decorator-observer) - uses the observer design pattern to send analytics and log and also uses the decorator pattern to measure performance in both web and node.js app
- [app-pt05-async-iterator-stream](./app-pt05-async-iterator-stream) - uses the iterator design pattern to consume streams and render data on demand

## Thanks!

Consider mentioning me on [twitter](https://twitter.com/erickwendel_/), [linkedin](https://linkedin.com/in/erickwendel/) or [instagram](https://www.instagram.com/erickwendel_/) about the experiments and ideas this repo may have brought to you.

Enjoy!