/23-Design-Patterns-with-TypeScript-in-Action

WIP: A repository about GoF 23 Design Patterns demonsration

Primary LanguageTypeScript

DESIGN PATTERN + TypeScript + React

IMPORTANT! - This repositoy is Work-In-Progress. It is neither stable or anything close to its finale stage. Please, don't use it as long as it has a WIP tag.

TL;DR

  • Singleton
  • Proxy (With Validation example)
  • Prototype (With effective clone example)
  • Observer (With Newsletter example)
  • Mediator (Whit ChatRoom example)

PURPOSE

This repository is part of a global initiative called Better Software Design Explained. It is a personal initiave which goal is to provide ready-to-use snippets or as a source of inspiration for better programming.

This repository contains a list of snippets around Design Patterns in the context of Javascript (TypeScript) and React.

This repository has been created as a personal memo to help me remember the various 23 patterns and pick one depending on situations.

PLUS-VALUE

It's certain there are dozens of good resources out there. Why this repository should get your attention and interest? First, this is not a commercial endeavor, so it's not built as such but as a personal project. If you are looking for the perfect edito, pass your way, there are better out there. that being said, this repository comes with some real benefits

  • Complete GoF 23 patterns in the context of TypeScript and React for some parts
  • All cases are testable. They come with a suite of test to make the run process simplier to understand
  • A local documentation with parttern explaination, problem its solve, Solution is provided
    • As it is a local documentation benefits is that it's transportable and editable

HOW TO CONSUME

  • Each of the "Gang of Four" pattern has its own documentation to better understand the concept, why they example and be as clear as possible thanks to examples and real-wold interpretation or programming usage
  • Each of the "Gang of Four" pattern has its own folder containing a use case snippet code and related unit test code
  • Thank to link you can easily navigate and reach the code or the documentation

SOURCES

This wiki is inpired from my book/web reading and research along with my personal experience. Below some resources, I used as inspiration, and you could use to dive deeper on each cases.