Course Content
Course Overview
What are the course structure and learning goals. Why design patterns matter in real-world C#/.NET development? How to choose the right pattern in a scenario? How's the course structured and what are your learning goals?
0/4
Phase 1 – Foundations of Behavior
These patterns are intuitive, practical, and extremely common in .NET.
0/5
Phase 2 – Structural Thinking
Now we think about object relationships and architecture.
0/5
Phase 3 – Object Interaction & Responsibility Flow
We increase the abstraction level by introducing interaction between object and the flow of responsibilities.
0/5
Phase 4 – Object Creation Mastery
Creation patterns are conceptually harder for beginners because they require understanding dependency inversion.
0/4
Phase 5 – Advanced / Specialized Patterns
These require strong abstraction maturity.
0/4
Bonus – Other Useful Patterns
These are some of the patterns you may need or encounter occasionally out there in the wild.
0/5
C#/.NET Design Patterns: The Complete Guide

We cover 28 patterns. We take the 23 from the Gang of Four book, and we add five enterprise patterns we meet constantly in .NET and never in that book.

The Three Classic Categories

The Gang of Four sorted their 23 by what varies.

Creational patterns govern how our objects get made: Singleton, Factory Method, Abstract Factory, Builder, Prototype.

Structural patterns govern how we compose objects into larger things: Adapter, Facade, Decorator, Proxy, Composite, Bridge, Flyweight.

Behavioral patterns govern how our objects talk and who owns which responsibility: Strategy, Observer, Command, State, Template Method, Iterator, Mediator, Chain of Responsibility, Visitor, Memento, Interpreter.

We think that is worth knowing and worth not organising a course around. It sorts patterns by what they do, which helps us once we know them and not while we are learning them.

How We Ordered It Instead

We ordered ours by how much abstraction each pattern asks of you. The concrete, everyday ones come first, and the ones needing more architectural maturity come last.

Phase 1, Foundations of Behavior: Strategy, Decorator, Observer, Factory Method, Template Method. Low abstraction, everywhere in ASP.NET Core, and they introduce composition and the Open/Closed Principle.

Phase 2, Structural Thinking: Adapter, Facade, Composite, Proxy, Bridge. Here we start reasoning about relationships between our objects, and about layering.

Phase 3, Object Interaction: State, Command, Iterator, Chain of Responsibility, Mediator. Our interactions get more abstract here, closer to architecture, and these are the backbone of pipelines.

Phase 4, Object Creation: Abstract Factory, Builder, Prototype, Singleton. Creation patterns land here rather than first, because they read much better once dependency inversion is familiar.

Phase 5, Advanced and Specialized: Visitor, Memento, Flyweight, Interpreter. Compilers, editors, syntax trees. We call them overkill in most business applications, and we still want to recognise them.

Bonus, Other Useful Patterns: Saga, Repository, Unit of Work, Specification, CQRS. Not Gang of Four, and the ones we are most likely to meet in a .NET code review this week.

That is the order we run the phases in. It is not the order you have to read them in.

Read It in Any Order You Like

We wrote every lesson to stand on its own. Each has its own runnable project, defines its own terms, and assumes nothing about what you read before it.

So work through it front to back if you want the full arc, or open the one pattern you need today and close the tab. Coming back in three months for a different pattern works exactly as well.

Choosing a Pattern

We pick one by naming the problem, never by matching a definition. Three questions get us most of the way:

What changes most often here, the way objects are created, the way they are structured, or the way they behave? Do we need to swap behavior at runtime, or only to separate concerns? And is there a simpler answer than adding a layer?

A pattern should remove coupling. If it only adds ceremony, we skip it.

What You Will Be Able to Do

By the end you can recognise all 28 patterns in code you did not write, and implement each one idiomatically in C#. You can refactor existing code toward the pattern that fits, and combine several in an ASP.NET Core or EF Core application. You can also argue against using one when its cost is not worth paying.

We think that last one matters as much as the rest.

Next we look at the source code and how we run it.

0% Complete