Topic
Public Surface
The set of types a component exposes to its callers. Everything a caller can receive, pass or must catch belongs on it, and everything else stays internal, so the interior can change without breaking anyone.
6 pages
Writing25 September 2026
Clean Abstractions Around Libraries
A library boundary owns the application's contract even when its terms match the library's. It contains provider types, validation, failures, and configuration, and keeps replacement possible.
Writing5 December 2020
Separate State from Behavior? Yes Please!
Separating state from behavior simplifies object-oriented systems: immutable DTOs carry data, while managers compose collaborators and make operations explicit at call sites.
Writing6 October 2019
Dependency Injection? No Thank You!
Dependency injection exposes private collaborators to callers when used for every internal relationship. Keep classes self-contained and let business code choose real variation.
Writing20 September 2019
Extension Methods? No Thank You!
Keep project-specific helpers as static methods: extension methods hide behavior behind namespaces and can change meaning with imports. Use them when they serve the wider C# community.
Chapter20 September 2017
Architecture Layers in C#
Structure communicates intent: strict layers from Domain Facade to Gateway, internal by default with a public surface the compiler enforces, and folder depth that marks each class's level of abstraction.
Chapter20 September 2017
Architecture Layers in Python
Structure communicates intent: strict layers from Domain Facade to Gateway, a public surface declared in the boundary __init__.py, and folder depth that marks each class's level of abstraction.