Runnable code samples for the Joyful Design Patterns book series. Every pattern in the books is shown in real, open-source code you can clone and run — not a class diagram and a toy example. This repository holds those samples.
The code runs against Herald.OSS (Apache-2.0), the structured-logging library used throughout the books.
The .NET 10 SDK — get it at https://dotnet.microsoft.com/download, then check it:
dotnet --version # should start with 10, e.g. 10.0.204That's the only requirement. The samples are single-file .NET 10 apps; the first run downloads the library from NuGet for you.
Every pattern has one self-contained file, patterns/<pattern>/demo.cs. Run one
from the repository root:
dotnet run patterns/01-strategy/demo.csOne file, one command, real output. The first line of each sample,
#:package Herald.OSS@0.12.8, is a .NET 10 file-based-app directive that pulls
the package on first run — no project file, no manual install.
- Herald.OSS — clone, read, and build the actual library every sample uses: https://github.com/mmpworks/Herald.OSS
- Herald DemoApp — a
dotnet toolthat runs a live Herald pipeline with an embedded viewer in two commands: https://github.com/mmpworks/Herald.DemoAppdotnet tool install --global Herald.DemoApp herald-demo
Apache-2.0 — see LICENSE. The samples are free to read, run, and adapt.