Type-Driven Development with F#
summary
Demonstrates F# type-driven design using algebraic types to model domain states (e.g., shopping-cart as empty/active/paid) and a ValidEmail/InvalidEmail type so send functions only accept valid addresses. Shows keeping business logic pure with side effects confined to command handlers, reports rewriting a C# project into a ~200-line pure domain tested with property-based fuzzing, and integrating Kafka, Orleans and Elasticsearch at the infrastructure layer rather than leaking effects into the domain.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:04FP philosophy in F#
- 3:55OOP vs FP architecture
- 7:05Logging with FP
- 10:42Single Responsibility in FP
- 13:30Pure domain isolation
- 16:45ADTs in F#
- 18:52Type safety and validation
- 19:55Modeling business logic
- 22:43FSMs and system state
- 25:51Error handling
- 29:22Function composition
- 31:50Clean code and testing
- 34:17Commands and CQRS
- 37:04Property-based testing
- 40:36Refactoring and architecture
- 43:01Dates and time in FP
- 44:24Domain docs and scripts
- 45:28Correctness in software
- 46:55Bounded types for safety
- 48:39Units of measure
- 51:04FP future and summary
related talks
49mDomain Modeling Made Functional
53mIntroduction to T(ype)DD with F# and Reactive Web Apps with Fable.io
47mCommunicating in Types
36mCommunicating in Types
39mCommunicating in Types
56mHow To "Dot" Into Anything, Anywhere, Anytime (Facilitating Data-First Programming)
39mTDD as in Type-Driven Development
33mPurifying Typescript
