Design Patterns applied to Javascript code.
Switch branches/tags
Nothing to show
Clone or download
Tomas Corral
Tomas Corral Update Readme.md
Latest commit e37f712 May 3, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Adapter Move code to ES2015 Apr 23, 2016
Bridge Add Bridge Design Pattern May 2, 2018
Builder Remove file Apr 15, 2018
Chaining Fix chainable example usage. Jul 26, 2016
Command - Rename folder Apr 24, 2016
Composite - Refactor name of internal folders. Apr 24, 2016
CompositeIterator - Refactor name of internal folders. Apr 24, 2016
Compound Move code to ES2015 Apr 23, 2016
Decorator Move code to ES2015 Apr 23, 2016
Facade Move code to ES2015 Apr 21, 2016
Factory Update PizzaIngredientFactory.js Mar 11, 2018
Flyweight Add Flyweight pattern May 3, 2018
Iterator - Refactor name of internal folders. Apr 24, 2016
Lazy Move code to ES2015 Apr 23, 2016
MVC Move code to ES2015 Apr 23, 2016
Module Revealed Move code to ES2015 Apr 23, 2016
Module Move code to ES2015 Apr 23, 2016
Multi-Inheritance-ES6 Move code to ES2015 Apr 23, 2016
Namespace Move code to ES2015 Apr 23, 2016
Nullify Move code to ES2015 Apr 23, 2016
Observer Move code to ES2015 Apr 23, 2016
Prototype Remove unneeded folder Apr 15, 2018
Proxy - Refactor name of internal folders. Apr 24, 2016
Singleton Add Prototype, Builder and add another implementation for Singleton Apr 15, 2018
State Move code to ES2015 Apr 23, 2016
Strategy Move code to ES2015 Apr 23, 2016
Template - Refactor name of internal folders. Apr 24, 2016
Try-Finally Move code to ES2015 Apr 23, 2016
statics Move code to ES2015 Apr 21, 2016
.babelrc - Refactor name of internal folders. Apr 24, 2016
.gitignore Move code to ES2015 Apr 19, 2016
README.md Update Readme.md May 3, 2018
gulpfile.babel.js - Refactor name of internal folders. Apr 24, 2016
package.json - Refactor name of internal folders. Apr 24, 2016

README.md

Design Patterns in Javascript ES6

This will be a repository of how to use the Design Patterns from Gang of Four in your applications with Javascript.

Update:

  • Added Flyweight implementation.
  • Added Bridge implementation.
  • Added Prototype and Builder implementations.
  • All the Design Patterns have been refactored to ES6.
  • Added the Multi-Inheritance Design Patterns exclusive for ES6.
  • Added new Design Patterns exclusive from Javascript.
  • Added changes to index.html. Now you can check the code to be executed and the execution without open the console. Thanks -adamnbowen-

Design Patterns that you can find in this repository:

  • Adapter
  • Builder
  • Bridge
  • Chaining
  • Command
  • Composite
  • Composite Iterator
  • Compound (Use some design patterns together to solve a problem)
  • Decorator
  • Facade
  • Factory
  • Iterator
  • Lazy
  • Module
  • Module Revealed
  • Multi-Inheritance ES6
  • MVC
  • Namespace
  • Nullify
  • Observer
  • Prototype
  • Proxy
  • Singleton
  • State
  • Strategy
  • Template
  • Try-Finally

This repository contains a folder by each design pattern.

Inside these folders you can found, in some of them, other folders with numbers . This folders are the different steps to follow to arrive to the final resolution of the problem. You will understand it better if you have one copy of the book I recomend you before.

To transpile the code to ES5 you should execute gulp

Do you want to collaborate?

All constructive comments are welcome. I promise I will answer everyone.

Agreements

Head First Design Patterns

Pro Javascript Design Patterns __