• Stars
    star
    2,618
  • Rank 17,486 (Top 0.4 %)
  • Language
    JavaScript
  • Created about 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Design Patterns applied to Javascript code.

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 __

More Repositories

1

javascript-challenges-book

Challenge yourself learning and understanding the most obscure and tricky parts of Javascript. http://tcorral.github.io/javascript-challenges-book/
JavaScript
803
star
2

JSONC

JSON compressor and decompressor
JavaScript
639
star
3

Refactoring_Patterns

A list of 31 Javascript refactoring patterns, based on the '31 Days of Refactoring' book by Sean Chambers and Simone Chiaretta, with the applied solutions.
JavaScript
227
star
4

Cutter.js

Truncate HTML code to limit its length by number of words without losing markup.
JavaScript
220
star
5

Hydra.js

Create a scalable, maintainable and module oriented system using Hydra.js
JavaScript
102
star
6

IM.js

Image Match - Project to allow compare different images pixel by pixel with good performance
JavaScript
81
star
7

Hermes.js

Message and Error logger implementation
JavaScript
30
star
8

Javascript-Best-Practices

Javascript Best Practices
JavaScript
15
star
9

html-to-wireframe

Tool to generate wireframes from an url or html file with different sizes.
JavaScript
15
star
10

Interface.js

Javascript Interface implementation
8
star
11

eslint-audio-formatter

Audio formatter/reporter for EsLint to get the reports in mp3 files with all the errors and warnings.
JavaScript
7
star
12

CORSET

A new way to break the x-origin policy in scripts allocated in different domains.
HTML
6
star
13

DesignPatterns_code

Code to use in talks about design patterns
JavaScript
6
star
14

Hydra_Extensions

Extensions for use with Hydra.js
JavaScript
6
star
15

TDD_Workshop

Code and slides from the TDD Workshop
JavaScript
5
star
16

swagger2-to-raml

Convert from Swagger 2.0 YAML to RAML 0.8 RAML
JavaScript
5
star
17

St.George-Legend

Transcription of St.George Legend to Javascript
JavaScript
4
star
18

observable-it

Implementation of Observable pattern for browser
JavaScript
4
star
19

CoffeeScript-Syntax-Definition

Syntax Highlight Definition for CoffeeScript to be used in Fisheye or Crucible by Atlassian
4
star
20

Focus.js

Library to set the focus of any element in DOM
JavaScript
4
star
21

HTML5-Storage-Practice

JavaScript
3
star
22

redux-time-machine

Convert your redux in a time machine. Basic to implement do-undo system in your application.
TypeScript
3
star
23

GIT_IRONHACK

2
star
24

ASR-Server-WF3

OpenText frontend framework
JavaScript
2
star
25

Refactoring-Exercise

2
star
26

EventHandler.js

Event handler
JavaScript
2
star
27

ukko-cli

Command line tool to manages the download all the needed repos and build them to have your development environment ready to start working in minutes
JavaScript
2
star
28

ukko

Module that manages the download all the needed repos and build them to have your development environment ready to start working in minutes
Perl
2
star
29

CSSplus

Compile CSS using variables to speed your development
2
star
30

Calendar

Calendar widget class to use on any Javascript code
JavaScript
2
star
31

methodology-angular-development

HTML
1
star
32

FBB

FBB, a.k.a. Frontend Building Blocks is a set of logic components that can be reused in your code to create your own widgets
JavaScript
1
star
33

Marvin.js

Javascript framework
1
star
34

Template

1
star
35

_test_busterjs

Zip file to test in buster.js
1
star
36

junit-reporter

jUnit reporter to use in any tool
JavaScript
1
star
37

ng-extend-test

A repository to test how to extend the different elements of AngularJS
JavaScript
1
star
38

spotiapp-web

HTML
1
star
39

mystiquex

Tool to manage and download different source endpoints
JavaScript
1
star
40

moonwalker

Tool to launch Selenese tests.
JavaScript
1
star
41

sensitive-data-cleaner

NPM package that will remove all sensitive data in package.json or package-lock.json
TypeScript
1
star
42

Koyote.js

Powerful and minimal mixin framework that allows you to be creative.
JavaScript
1
star
43

code2mp3

An experiment to convert any code to mp3 music.
JavaScript
1
star
44

Plant.js

Template System
1
star
45

Enumerable.js

Add Enumerable behaviour to Array
1
star
46

Backbone_Workshop_code

Backbone.js practice and solution code
1
star