Moving IO to the edges of your app: Functional Core, Imperative Shell
summary
Argues to keep all non-deterministic I/O at the perimeter and make business logic a pure, testable core that returns explicit decision types; demonstrates C# and F# examples, uses enums/discriminated unions to represent outcomes, and shows refactors that turn void/IO-heavy methods into pure functions plus an imperative shell. Recommends functional core, imperative shell, prefers lightweight DB access (Dapper) over ORMs like Entity Framework, and outlines five dependency strategies including dependency rejection and discriminated unions as a modeling tool.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:11IO out of domain logic
- 5:28IO at workflow edges
- 12:28Refactor IO from business logic
- 23:20Customer profile updates example
- 30:52Pure code benefits
- 36:31Validation architecture
- 41:50Domain design checklist
- 43:34Dependency management approaches
- 59:40Key takeaways
related talks
46mBoundaries
01h 00mFunctional architecture - The pits of success
52mGo Fully Functional and Take Your Legacy Code with You!
52mEvolving a Pragmatic, Clean Architecture A Craftsman's Guide
41mUsing Boundary-Driven Development to beat code complexity
43mFunctional UI, Functional Apps
24mBuilding Software Architecture from First Principles
01h 29mArchitecture Beyond Clean & Hexagonal
