Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Cheat sheet · Build products

Design Patterns cheat sheet

Free

For developers who want a compact reference to the 23 classic design patterns and the SOLID principles, to use in code reviews and design discussions. Each pattern has its intent, when to reach for it and a short TypeScript sketch, followed by a map from common problems to the pattern that fits.

Curated by Tauseef Fayyaz8 chapters45 concepts51 glossary terms

Chapters

8 chapters · 45 concepts

  1. 1How to use patternsWhat a design pattern is, the three families in the Gang of Four catalogue, and the two principles most patterns are built on.6 concepts
  2. 2Creational patternsThe five patterns that decide how objects get created, so calling code does not depend on concrete classes or messy constructors.5 concepts
  3. 3Structural patternsThe seven patterns that compose classes and objects into larger structures while keeping them flexible.7 concepts
  4. 4Behavioural patterns: requests and eventsPatterns for passing requests, events and state between objects without tying them tightly together.6 concepts
  5. 5Behavioural patterns: varying behaviourPatterns for swapping algorithms, changing behaviour with state, fixing a skeleton of steps, and adding operations to object structures.5 concepts
  6. 6SOLID principlesThe five principles behind maintainable object-oriented code, each with the smell that tells you it is being broken.5 concepts
  7. 7Principles beyond SOLIDShort rules that sit next to SOLID in code reviews, and the anti-patterns that appear when they are ignored.6 concepts
  8. 8Choosing a patternMap the problem in front of you to a pattern, and recognise the patterns already inside the frameworks you use.5 concepts
  9. 9Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.51 terms

About this sheet

All 23 Gang of Four patterns with intent, when to use and a TypeScript sketch, plus SOLID, related principles and a problem to pattern map.

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com