Skip to content

Design Patterns in TypeScript

This website is about the GoF (Gang of Four) Design Patterns but implemented in TypeScript.

It is supplementary to my courses on Udemy and YouTube (Channel membership required)

  

Course Access

There are 3 possible ways to access the video content in this course,

  1. Book : https://amzn.to/3Ruhu9d : (ASIN : B0948BCH24 / B094716FD6)
  2. Udemy : https://www.udemy.com/course/design-patterns-typescript/
  3. YouTube Membership : https://www.youtube.com/@sbcode/join

Tip

Design Pattern In TypeScript (Book) includes Video Access Codes to view videos for FREE from this official documentation website at https://sbcode.net/typescript/

Tip

Get Udemy Discount Coupons at https://sbcode.net/coupons

Overview

A Design Pattern is a description or template that can be repeatedly applied to a commonly recurring problem in software design.

You will find a familiarity with Design Patterns very useful when planning, discussing, developing, managing and documenting your applications from now on and into the future.

You will learn these Design Patterns

Pattern Types

In the list of patterns above, there are Creational, Structural and Behavioral patterns.

  • Creational : Abstracts the instantiation process so that there is a logical separation between how objects are composed and finally represented.
  • Structural : Focuses more on how classes and objects are composed using the different structural techniques, and to form structures with more or altered flexibility.
  • Behavioral : Are concerned with the inner algorithms, process flow, the assignment of responsibilities and the intercommunication between objects.

Class Scope and Object Scope Patterns

Each pattern can be further specified whether it relates more specifically to classes or instantiated objects.

Class scope patterns deal more with relationships between classes and their subclasses.

Object scope patterns deal more with relationships that can be altered at runtime

Pattern Description Scope Type
Factory, Abstract Factory Defers object creation to subclasses Class Creational
Builder, Prototype, Singleton Defers object creation to objects Object Creational
Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy Describes a way to assemble objects Object Structural
Interpreter, Template Describes algorithms and flow control Class Behavioral
Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Visitor Describes how groups of objects co-operate Object Behavioral