Modular Code with Examples in C#
summary
Argues that in C# the useful module boundary is the assembly not namespaces or folders, demonstrates a small Quest Worlds contest resolver implemented as multiple assemblies on GitHub, and recommends defaulting types to internal so implementation can be refactored without breaking callers. Shows using Brighter and CQRS/ports & adapters patterns, warns against InternalsVisibleTo for tests, counts coupling to evaluate modules, and treats modules as deployable, feature‑flaggable units. assembly is the module boundary test the public exports
AI-written summary · about
chapters (23)
- 0:00Modular software design
- 1:55Modularity in software
- 3:00Fundamental law of software engineering
- 5:05History of modularity
- 7:10Information hiding in modules
- 11:07Modules in C#
- 16:24Deep vs shallow modules
- 19:41Implementing modules in C#
- 22:27Public vs internal access
- 25:39Testing modules
- 28:09Modules vs layers
- 33:27Sacred cows of .NET modularity
- 34:09RPG automation example
- 36:36Workflow decomposition
- 38:02Actor and action design
- 42:14Module boundaries review
- 44:44Coupling and entity trap
- 49:40Architectural styles
- 56:18Hybrid architectures
- 58:26Narrow module interfaces
- 1:00:10Modules for AI agents
- 1:01:32Modules vs microservices
- 1:03:58Practical modularization steps
related talks
01h 02mDistribu-ready with the Modular Monolith
57mDistribu-ready with the Modular Monolith
46mModular Applications with Spring
29mA Brief History of Modularity
45mModular Web Applications with ASP.NET Core
46mFrom Chaos to Cohesion: Building Modular Monoliths in the Real World
58mBuild software like a bag of marbles, not a castle of LEGO®
01mMark Richards at DDD Europe
