Design Patterns in JavaScript

Design Patterns in JavaScript
Design Patterns in JavaScript
English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 10 Hours | 3.30 GB

Discover the modern implementation of design patterns in JavaScript

This course provides a comprehensive overview of Design Patterns in JavaScript from a practical perspective. This course in particular covers patterns with the use of:

  • The latest versions of the JavaScript programming language
  • Use of modern programming libraries and frameworks
  • Use of modern developer tools such as JetBrains WebStorm
  • Discussions of pattern variations and alternative approaches

This course provides an overview of all the Gang of Four (GoF) design patterns as outlined in their seminal book, together with modern-day variations, adjustments, discussions of intrinsic use of patterns in the language.

What are Design Patterns?

Design Patterns are reusable solutions to common programming problems. They were popularized with the 1994 book Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, John Vlissides, Ralph Johnson and Richard Helm (who are commonly known as a Gang of Four, hence the GoF acronym).

The original book GoF book used C++ and Smalltalk for its examples, but, since then, design patterns have been adapted to every programming language imaginable: C#, Java, Swift, Python and now — JavaScript!

The appeal of design patterns is immortal: we see them in libraries, some of them are intrinsic in programming languages, and you probably use them on a daily basis even if you don’t realize they are there.

What Patterns Does This Course Cover?

This course covers all the GoF design patterns. In fact, here’s the full list of what is covered:

  • SOLID Design Principles: Single Responsibility Principle, Open-Closed Principle, Liskov Substitution Principle, Interface Segregation Principle and Dependency Inversion Principle
  • Creational Design Patterns: Builder, Factories (Factory Method and Abstract Factory), Prototype and Singleton
  • Structrural Design Patterns: Adapter, Bridge, Composite, Decorator, Façade, Flyweight and Proxy
  • Behavioral Design Patterns: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method and Visitor

This course is for JavaScript developers who want to see not just textbook examples of design patterns, but also the different variations and tricks that can be applied to implement design patterns in a modern way. For example, the use of Symbol.iterator allows objects (including iterator objects) to be iterable and lets scalar objects masquerade as if they were collections.

Presentation Style

This course is presented as a (very large) series of live demonstrations being done in JetBrains WebStorm and presented using the Kinetica rendering engine. Kinetica removes the visual clutter of the IDE, making you focus on code, which is rendered perfectly, whether you are watching the course on a big screen or a mobile phone.

Most demos are single-file, so you can download the file attached to the lesson and run it in WebStorm, Atom or another IDE of your choice (or just run them from the command-line).

This course does not use UML class diagrams; all of demos are done via live coding.

What you’ll learn

  • Recognize and apply design patterns
  • Refactor existing designs to use design patterns
  • Reason about applicability and usability of design patterns
Table of Contents

Introduction to Object-Oriented JavaScript
1 Introduction
2 Tools of the Trade

SOLID Design Principles
3 Overview
4 Single Responsibility Principle
5 Open-Closed Principle
6 Liskov Substitution Principle
7 Interface Segregation Principle
8 Dependency Inversion Principle
9 Summary

Builder
10 Gamma Categorization
11 Overview
12 Builder
13 Builder Facets
14 Summary

Factory
15 Overview
16 Factory Method
17 Factory
18 Abstract Factory
19 Summary

Prototype
20 Overview
21 Explicit Copying
22 Copy Through Serialization
23 Prototype Factory
24 Summary

Singleton
25 Overview
26 Singleton Implementation
27 Monostate
28 Singleton Problems
29 Summary

Adapter
30 Overview
31 Adapter
32 Adapter Caching
33 Summary

Bridge
34 Overview
35 Bridge
36 Summary

Composite
37 Overview
38 Geometric Shapes
39 Neural Networks
40 Summary

Decorator
41 Overview
42 Decorator
43 Summary

Facade
44 Overview
45 Facade
46 Summary

Flyweight
47 Overview
48 Text Formatting
49 User Names
50 Summary

Proxy
51 Overview
52 Value Proxy
53 Property Proxy
54 Protection Proxy
55 Virtual Proxy
56 Summary

Chain of Responsibility
57 Overview
58 Method Chain
59 Command Query Separation
60 Broker Chain
61 Summary

Command
62 Overview
63 Command
64 Command Undo
65 Summary

Interpreter
66 Overview
67 Lexing
68 Parsing
69 Summary

Iterator
70 Overview
71 Array Backed Properties
72 Iterator
73 Tree Traversal
74 Summary

Mediator
75 Overview
76 Chat Room
77 Mediator with Events
78 Summary

Memento
79 Overview
80 Memento
81 Undo and Redo
82 Summary

Observer
83 Overview
84 Events
85 Property Observers
86 Property Dependencies
87 Summary

State
88 Overview
89 Classic State
90 Handmade State Machine
91 Summary

Strategy
92 Overview
93 Strategy
94 Summary

Template Method
95 Overview
96 Template Method
97 Summary

Visitor
98 Overview
99 Intrusive Visitor
100 Reflective Visitor
101 Classic Visitor
102 Summary

Course Summary
103 Course Summary