Skip to content

Design Patterns

October 22, 2023
May 24, 2019

Contains Programming paradigm - Wikiwand and Software design pattern - Wikiwand

dwmkerr/hacker-laws: 💻📖 Laws, Theories, Principles and Patterns that developers will find useful. #hackerlaws

Do Functions Make Design Patterns Obsolete? - YouTube implement design pattern with functions

4 Programming Paradigms In 40 Minutes - YouTube
What Makes Functional and Object-oriented Programming Equal

10 Basic Programming Principles Every Programmer Must Follow
Code Principles Every Programmer Should Follow | by Mahdhi Rezvi | Bits and Pieces

Home | Patterns 42
Table of Contents · Game Programming Patterns
Patterns - Sam Newman

Design a Basic Search Engine (Google or Bing) | System Design Interview Prep - YouTube
20 System Design Concepts Explained in 10 Minutes - YouTube

BeckDesignRules for Database Developers Part 1: Passes the tests - DEV Community 👩‍💻👨‍💻

Software Design | Khalil Stemmler
Composing Software: The Book - JavaScript Scene - Medium ❗!important

SOLID, GRASP, and Other Basic Principles of Object-Oriented Design - DZone

架构整洁之道, 看这一篇就够了! - 阿里技术

Object Oriented Programming

Design Patterns | Coursera
Design Patterns | Object Oriented Design
Design Patterns – ITNEXT by Ruslan Malogulko
JavaScript Design Patterns - doFactory.com
Design patterns in modern JavaScript development – Levelup Your Coding

Design Patterns for Beginners - New Version - YouTube
10 Design Patterns Explained in 10 Minutes - YouTube JavaScript
8 Design Patterns EVERY Developer Should Know - YouTube

8 Design Patterns EVERY Developer Should Know - YouTube
8 Design Patterns | Prime Reacts - YouTube

Top 10 Object-Oriented Design Principles for writing Clean Code - DEV Community 👩‍💻👨‍💻

Gang of Four

Design Patterns - Wikiwand
Design Patterns Book
Design Patterns CD: Elements of Reusable Object-Oriented Software

Episode 215: Gang of Four – 20 Years Later : Software Engineering Radio

Erich Gamma: http://en.wikipedia.org/wiki/Erich_Gamma
Richard Helm: http://en.wikipedia.org/wiki/Richard_Helm
Ralph Johnson: http://en.wikipedia.org/wiki/Ralph_Johnson_(computer_scientist)
John Vlissides: http://en.wikipedia.org/wiki/John_Vlissides

Creational Patterns

creation of object, rather than instantiation

Creational pattern - Wikiwand

Abstract Factory
Factory method
Singleton

The Builder Pattern and Typestate Programming - Stefan Baumgartner - Rust Linz January 2023 - YouTube

Structural Patterns

class and object composition

Structural pattern - Wikiwand

Association, aggregation, and composition in OOP explained | InfoWorld
Three Thoughts on Encapsulation - Better Programming - Medium

Money Pattern: The Right Way to Represent Value-Unit Pairs

Behavioural Patterns

communication between objects

Behavioral pattern - Wikiwand

Publisher Subscriber vs Observer pattern with C# - DEV
new() return an object with partially initialized states (like an abstract class)
with function(s) to initialize the remaining states and return a working class

On the Contrary

Is OOP EVIL??? Reacting to my favorite dev Youtube video - YouTube 54:48
Object-Oriented Programming is Bad - YouTube Brian Will, ❗!important
Talks - Bruce Eckel: Rethinking Objects - YouTube
Object-Oriented Programming is Embarrassing: 4 Short Examples - YouTube
The End Of Object Inheritance & The Beginning Of A New Modularity - YouTube

Goodbye, Object Oriented Programming – Charles Scalfani – Medium
Why Are So Many Developers Hating on Object-Oriented Programming? - The New Stack
Object-Oriented Programming is The Biggest Mistake of Computer Science | by Ilya Suzdalnitski | Jan, 2021 | Medium

Aspect Oriented Programming

Aspect-oriented programming - Wikiwand

Functional Programming

functional-programming

Hexagonal Architecture

Hexagonal architecture (software) - Wikiwand
Hexagonal Architecture: What Is It and How Does It Work? - NDepend
Hexagonal Architecture - DEV Community

How To Make Your App Maintainable (hint: Adopt Hexagonal Architecture) - YouTube
Hexagonal Architecture: What You Need To Know - Simple Explanation - YouTube
Hexagonal Architecture In Golang!? - Full Structure Example - YouTube

Domain Driven Design

Domain-driven design - Wikiwand
Domain-Driven Design | Khalil Stemmler

domain driven design
BoundedContext
UbiquitousLanguage

Domain Driven Design: What You Need To Know - YouTube ❗!important

PP - How To Implement Domain-Driven Design (DDD) in Golang
How To Implement Domain-Driven Design (DDD) in Go - YouTube 1:57:41
How To Structure Domain Driven Design (DDD) In Go - YouTube

Domain Driven Design (DDD) in Golang!? - YouTube

Domain-Driven Design with React: Build Scalable React Apps | Bits and Pieces

Model Driven Engineering/MDE

MDENet – Home of the MDE community
Xtext - Language Engineering Made Easy!

Model Driven Software Engineering - Computerphile - YouTube
MDE under the Hood (Model Driven Engineering) - Computerphile - YouTube
szschaler/GridGames: A DSL for developing grid-based arcade-style games. Because, .... fun! with x-text

RAII

Resource acquisition is initialization - Wikiwand
Rust and RAII Memory Management - Computerphile - YouTube

CSP

Communicating sequential processes - Wikipedia, the free encyclopedia
Communicating Sequential Processes (CSP), by C. A. R. Hoare (Electronic Version)

CSP and transducers in JavaScript
ubolonton/js-csp

Dmitry Kandalov - Coroutines explained | Code Mesh LDN 18 - YouTube

Principle of Least Knowledge

Law of Demeter - Wikiwand
Demeter: It’s not just a good idea. It’s the law. | Virtuous Code
Law of Demeter: Principle of Least Knowledge
Demystifying the Law of Demeter principle | InfoWorld

SOLID Principles

SOLID - Wikiwand
S: Single Responsibility Principle
O: Open-Closed Principle
L: Liskov-Substitution Principle
I: Interface Segregation Principle
D: Dependency Inversion Principle

Clean Coder - Getting a SOLID start.
A Solid Guide to SOLID Principles | Baeldung
The SOLID Principles - Tuts+ Code Tutorials
SOLID Principles every Developer Should Know – Bits and Pieces
SOLID Principles for Programming and Software Design
SOLID Principles: The Software Developer's Framework to Robust & Maintainable Code [with Examples] | Khalil Stemmler
The SOLID Principles | A C Roynon
Applying SOLID To React. SOLID principles were developed to help… | by Eduardo Moniz | Docler Engineering | Apr, 2021 | Medium

Software Design - Introduction to SOLID Principles in 8 Minutes - YouTube
Uncle Bob SOLID principles - YouTube
Uncle Bob's SOLID principles made easy 🍀 - in Python! - YouTube
This is the Only Right Way to Write React clean-code - SOLID - YouTube
5 Principles that will make you a SOLID JavaScript Developer
SOLID Principles: Improve Object-Oriented Design in Python – Real Python

Why SOLID Principles are not a solid solution for Software Design | by Elye | Apr, 2021 | Towards Data Science

Single Responsibility Principle

Single responsibility principle - Wikiwand
The Single Responsibility Principle | 8th Light
Single Responsibility Principle | Object Oriented Design
Understanding SOLID Principles: Single Responsibility | by Fanis Despoudis | codeburst

Open/Closed Principle

Open–closed principle - Wikiwand
Understanding SOLID Principles: Open Closed Principle
A simple example of the Open/Closed Principle
Open Close Principle | Object Oriented Design
The Open-Closed Principle at an Architectural Level - DZone Microservices
SOLID Design Principles Explained – The Open/Closed Principle with Code Examples

Liskov Substitution Principle (LSP)

The Liskov Substitution Principle at an Architectural Level - DZone Microservices
Liskov's Substitution Principle | Object Oriented Design
The Liskov Substitution Principle - Google Drive
Abstractivate: What FP taught me about OO: Liskov Substitution Principle explained

Inversion of Control/Dependency Injection

Dependency Injection: split creatiion and use of dependency
Dependency Inversion: a design pattern to create abstract class for dependency to prevent coupling to an implementation, implies Dependency Injection

Inversion of control - Wikiwand
Dependency injection - Wikiwand

Inversion of Control Containers and the Dependency Injection pattern
Excellent Explanation of Dependency Injection (Inversion of Control) | JavaWorld
Dependency Injection (DI) vs. Inversion of Control (IOC) - CodeProject
Dependency Inversion Principle | Object Oriented Design
Understanding SOLID Principles: Dependency Inversion | by Fanis Despoudis | codeburst

Dependency INVERSION vs dependency INJECTION in Python - YouTube
Dependency Injection | Prime Reacts - YouTube Strategy Pattern + DI

IoC vs. DI - DZone Java
Inversion of Control and Dependency Injection with Spring | Baeldung
Kotlin Dependency Injection with the Reader Monad – Jorge Castillo – Medium

insert-koin.io · a smart Kotlin dependency injection framework

afollestad/ulfberht: 🗡️ A small but powerful & opinionated DI library. Written in Kotlin, and powered by annotation processing.

Dagger
Using Dagger 2 for dependency injection in Android - Tutorial
Dagger in Kotlin: Gotchas and Optimizations - Android Developers - Medium

CUPID Properties

CUPID - for joyful code
CUPID - for joyful coding - Speaker Deck
CUPID—for joyful coding - Dan North & Associates Ltd

Keynote: CUPID ‒ for joyful coding! | Daniel Terhorst-North | JAX Online 2021 - YouTube
Daniel Terhorst-North - SOLID vs. CUPID - YouTube

CUPID—the back story - Dan North & Associates Ltd

Where the Unix philosophy breaks down
transaction costs: transformation of output of upstream to fit downstream

GRASP Principles

general responsibility assignment software patterns

GRASP (object-oriented design) - Wikiwand easier to understand and more practical than SOLID
GRASP: 9 Must-Know Design Principles for Code - Fluent C++

GRASP Design Principles: Why They Matter (And How to Use Them) - YouTube
ArjanCodes/2023-grasp

rao.pdf
https://personal.utdallas.edu/~chung/SP/applying-uml-and-patterns.pdf

Railway Oriented Programming

Functions return Result type that contains the tuple <success value, error value>, known as Monads in functional programming
In normal flow the code stays on the success track, and errors are handled in the failure track
No more hidden control flow in exception handling
Rust and Go adopts this approach

Monadic Error Handling in Python ⚠ Write Better Python Code Part 7B - YouTube
Features — returns documentation
dry-python/returns: Make your functions return something meaningful, typed, and safe!

result · PyPI

Locality of Behaviour

</> htmx ~ Locality of Behaviour (LoB)

Saga

Open Source Durable Execution Platform | Temporal Technologies
Home | Learn Temporal
Courses | Learn Temporal

Compensating Actions, Part of a Complete Breakfast with Sagas
Saga Pattern Made Easy - DEV Community

Temporal - YouTube
What is a Saga in Microservices? - YouTube

CQRS

Command Query Responsibility Segregation scale read and write independently as each have different techniques in optimizing.

CQRS
Command–query separation - Wikiwand
Command Query Responsibility Segregation (CQRS)
Command and Query Responsibility Segregation (CQRS) Pattern
Command Query Segregation | Object-Oriented Design Principles w/ TypeScript | Khalil Stemmler
From CQS to CQRS – @herbertograca
Concepts of CQRS - DZone Microservices

CodeOpinion
Is CQRS Complicated? No, it's simple! - YouTube
Fat Controller CQRS Diet - YouTube

CQRS pitfalls and patterns - Udi Dahan - NDC Oslo 2023 - YouTube

CQRS, Task Based UIs, Event Sourcing agh! | Greg Young
CQRS and Event Sourcing Intro For Developers - DZone Microservices

Event-Driven Architectures

GOTO 2017 • The Many Meanings of Event-Driven Architecture • Martin Fowler - YouTube
GOTO 2020 • The Power of Event-Driven Systems without Burning your Hands or Budgets • Allard Buijze - YouTube

Event-Driven Architecture lost its way - YouTube action-centric events instead of data-centric ones
Event-Driven Architecture: Explained in 7 Minutes! - YouTube

Event-driven architecture, state machines et al. - 250bpm
State Machines for Event-Driven Systems | Embedded Systems Experts
From Request/Response to Events - DZone Microservices
How to tame event-driven microservices | InfoWorld

Implementing Your Own Event Loop From Scratch - DEV Community
pratikgchaudhari/event-loop-demo: A project to learn how Event Loop works.

The Many Meanings of Event-Driven Architecture • Martin Fowler • GOTO 2017 - YouTube
Event-Driven Architecture: I do not think it means what you think it means - YouTube

5 Must-Know Distributed Systems Design Patterns for Event-Driven Architectures | by Arslan Ahmad | May, 2023 | Level Up Coding

  1. Publisher/Subscriber Pattern (Pub-Sub)
  2. Event Streaming Pattern
  3. Event Sourcing Pattern
  4. Backpressure Pattern
  5. Saga Pattern

Event Sourcing

Event Sourcing
Event Sourcing • Martin Fowler • YOW! 2016 - YouTube

Event Store The stream database written from the ground up for event sourcing.

Events log is the single source of truth.
Allows changing schema by replaying event history to get latest state.

Why use Event Sourcing? | Greg Young
Why Event Sourcing is a microservice communication anti-pattern - DEV Community 👩‍💻👨‍💻

Microservices + Events + Docker = A Perfect Trio - YouTube
Design Patterns: Why Event Sourcing? - YouTube
GOTO 2014 • Event Sourcing • Greg Young - YouTube

MVC/MVVM/MVP

Which Software Architecture Should You Use: MVC, MVP, or MVVM? - YouTube
ArjanCodes/2022-gui

MVC
V has reference to M, C has reference to V and M
MVP
V has reference to P, P has reference to V and M
P serves as a facade between V and M
MVVM
data binding
V bind to VM's property, VM don't have reference to V

Why I No Longer Use MVC Frameworks ❗!important
MVP is not as flexible as MVVM as the Presenter can only exist with a View.

Model–view–controller - Wikiwand
Model–view–viewmodel - Wikiwand
Android Architecture Components | Android Developers

A proper Model is ignorant of the ViewModel, and a proper ViewModel is ignorant of the View. However, often a programmer tailors the data types exposed by the ViewModel to the data types associated with particular user interfaces.

Advantages and disadvantages of M-V-VM | Microsoft Docs
Diffrence between MVP MVC MVVM in detail
MVC, MVP and MVVM Design Pattern – Ankit Sinhal – Medium
Why to choose MVVM over MVP — Android Architecture – AndroidPub
Common Android Architectures (MVC vs MVP vs MVVM) – Anmol Sehgal – Medium
What is difference between MVC, MVP & MVVM design pattern in terms of coding c# - Stack Overflow
Understanding The Difference Between MVC, MVP and MVVM Design Patterns
Architecture Comparison Between MVC vs. MVP vs. MVVM
MVC/MVP/MVVM/CLEAN/VIPER/REDUX/MVI/PRNSAASPFRUICC — building abstractions for the sake of building…

Access a Control Method from a ViewModel – Xamarin Help
store control in VM, binding control to ContentControl in View
c# - WPF change control in modelview - Stack Overflow
c# - Binding ContentControl Content for dynamic content - Stack Overflow
How To Make Unit Tests for ViewModel Easier To Write and Maintain | Better Programming

Android Architecture Patterns Part 1: Model-View-Controller — upday tech blog - now at medium
Android Architecture Patterns Part 2: Model-View-Presenter
Android Architecture Patterns Part 3: Model-View-ViewModel
MVVM — It’s All In The (Implementation) Details - upday devs - Medium

App architecture: MVVM in Flutter using Dart Streams - QuickBird Studios Blog
App architecture: Functional MVVM with RxJava & RxSwift - QuickBird Studios Blog

Android Modularization: Hexagonal Architecture with Kotlin and MVVM — Part 1: The Big Picture
Android Modularization: Hexagonal Architecture with Kotlin and MVVM — Part 2: The Connections
xvermilion/ModularizationSample: Sample project for modularizing an Android application

浅谈 MVC、MVP 和 MVVM 架构模式
谈谈 MVX 中的 Model
谈谈 MVX 中的 View
谈谈 MVX 中的 Controller

DRY

AHA Programming 💡
DRY: Don't Repeat Yourself
WET: Write Everything Twice (but not thrice)
AHA: Avoid Hasty Abstractions

The WET Codebase — Overreacted
The Wet Codebase by Dan Abramov – Deconstruct
Goodbye, Clean Code — Overreacted

MVU/Unidirectional Data Flow

flux
reduxjs

State Management & Unidirectional Data Flow
Unidirectional data flow on Android: The blog post (part 1).
Unidirectional data flow on Android: The blog post (part 2).
Unidirectional data flow on Android: The blog post (part 3).
Making Android unidirectional data flow with Kotlin coroutines 🦄

Unidirectional Data Flow? Yes. Flux? I Am Not So Sure. | by Adam Neary | Medium
Understanding unidirectional data flow in React | by Liz Denhup | Medium

Angular Development Mode: What is Unidirectional Data Flow?

SAM - State | Action | Model

The Elm Architecture · An Introduction to Elm
Model-View-Update (MVU) – How Does It Work?
Model View Update - Part 1 - Beginning Elm
Model View Update - Part 2 - Beginning Elm