All Projects → Badacadabra → Javascript Design Patterns

Badacadabra / Javascript Design Patterns

Licence: mit
📎 ES5 + ES6 + CoffeeScript + TypeScript design patterns with some theory, real-world examples and UML diagrams

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
coffeescript
4710 projects
es6
455 projects
ecmascript
72 projects
es5
17 projects

Projects that are alternatives of or similar to Javascript Design Patterns

design-patterns
👨🏻‍💻 Swoole微课程-PHP设计模式相关代码
Stars: ✭ 51 (-80.83%)
Mutual labels:  design-patterns
design-patterns-for-parser-combinators
A Really Cool Calculator written in Haskell... or is it?
Stars: ✭ 29 (-89.1%)
Mutual labels:  design-patterns
software-design-pattern
Software design pattern
Stars: ✭ 43 (-83.83%)
Mutual labels:  design-patterns
data-algorithms-with-spark
O'Reilly Book: [Data Algorithms with Spark] by Mahmoud Parsian
Stars: ✭ 34 (-87.22%)
Mutual labels:  design-patterns
laravel-filters
Need some filters? This package is based on the Repository Design Pattern to let you create specific queries easily.
Stars: ✭ 19 (-92.86%)
Mutual labels:  design-patterns
Software-Design
No description or website provided.
Stars: ✭ 23 (-91.35%)
Mutual labels:  design-patterns
adhesion-rs
D-inspired contract programming in Rust using macros
Stars: ✭ 49 (-81.58%)
Mutual labels:  design-patterns
Design Patterns Js
All the 23 (GoF) design patterns implemented in Javascript
Stars: ✭ 3,026 (+1037.59%)
Mutual labels:  design-patterns
js-training
JS Training Course
Stars: ✭ 39 (-85.34%)
Mutual labels:  design-patterns
Design
🎨 Everything Design related in OSCA
Stars: ✭ 23 (-91.35%)
Mutual labels:  design-patterns
patterns
📰 A collection of UI / UX patterns for different types of applications
Stars: ✭ 67 (-74.81%)
Mutual labels:  design-patterns
CSharpDesignPatterns
Examples of design patterns, using C# code.
Stars: ✭ 84 (-68.42%)
Mutual labels:  design-patterns
brevis
CSS at scale
Stars: ✭ 62 (-76.69%)
Mutual labels:  design-patterns
riblet-sample
A sample to represent Uber Riblets design pattern using Swift.
Stars: ✭ 42 (-84.21%)
Mutual labels:  design-patterns
Go Design Pattern
golang design pattern go 设计模式实现,包含 23 种常见的设计模式实现,同时这也是极客时间-设计模式之美 的笔记
Stars: ✭ 253 (-4.89%)
Mutual labels:  design-patterns
design-patterns-java
📗 Classic OOP Design Patterns from GoF, implemented in Java.
Stars: ✭ 25 (-90.6%)
Mutual labels:  design-patterns
DoFactorydotNetDesignPattern
http://www.dofactory.com/net/design-patterns
Stars: ✭ 17 (-93.61%)
Mutual labels:  design-patterns
Examplesofdesignpatterns
设计模式的总结与例子(有XMind,Uml图和详细代码实现说明)
Stars: ✭ 265 (-0.38%)
Mutual labels:  design-patterns
Flawless Ios
Awesome iOS guides from the community, shared on Flawless iOS Medium blog 👉
Stars: ✭ 260 (-2.26%)
Mutual labels:  design-patterns
common
常用的模式、方法、算法。Common patterns and methods.
Stars: ✭ 59 (-77.82%)
Mutual labels:  design-patterns

PatternifyJS - JavaScript Design Patterns

About

PatternifyJS is a reference of the main design patterns in JavaScript. JS libraries are not covered, but the core scripting languages around JavaScript are there. Here is the list of all available languages:

  • ECMAScript (Vanilla)
    • ES5
    • ES6
  • CoffeeScript
  • TypeScript

The Gang of Four (GoF) patterns are based on original synopses inspired from the real life and are available in two distinct flavors: "classic" & "idiomatic".

The classic style emulates the principles of traditional class-based object-oriented languages like Java. Therefore, this style makes heavy use of packages, abstraction, interfaces, classes, inheritance, composition, encapsulation and polymorphism. As a prototype-based language, JavaScript does not have all these functionalities natively (despite all the syntactic sugar introduced by ES6). But it is still possible to use and reproduce most of these concepts... For obvious reasons, constructor functions are the rule in the classic style and each design pattern of this category has its own UML class diagram.

The idiomatic style reveals the true nature of JavaScript. Constructor functions and classes are replaced by factory functions and object literals, there is no abstraction anymore, encapsulation is reduced to the minimum and flexibility raised to the maximum. With this style, the GoF patterns are a bit difficult to recognize because their overall structure is blurred. But here it is more reasonable to think about objects directly, not about classes. This is the reason why class diagrams have been replaced by UML object diagrams in the idiomatic style.

Apart from the GoF patterns, there are also miscellaneous (functional and more) patterns in JavaScript that make life easier. They can be of a great help!

Gang of Four (GoF) patterns

Miscellaneous patterns

Inspiring resources

  • JavaScript: The Definitive Guide by David Flanagan
  • JavaScript: The Good Parts by Douglas Crockford
  • Learning JavaScript Design Patterns by Addy Osmani
  • Exploring ES6 by Axel Rauschmayer
  • The Little Book on CoffeeScript by Alex MacCaw
  • TypeScript Deep Dive by Basarat Ali Syed
  • Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].