Functional architecture - The pits of success
summary
Argues that functional code naturally produces ports-and-adapters structure by forcing a strict pure vs impure boundaries discipline; demonstrates with F# and Haskell examples of a reservation flow (validate JSON, read reserved seats from DB, check capacity, save reservation, return HTTP) where three pure functions and two impure ones compose cleanly. Shows Hindley‑Milner typing in Haskell makes missteps fail to compile, and claims pure functions yield isolation so unit tests are simpler and less brittle.
AI-written summary · about
chapters (26)
- 0:00Intro
- 2:30Nonfunctional requirements
- 5:55Preface
- 8:20Port and adapters
- 13:00Pure functions
- 16:50Restaurant reservation example
- 20:50impure function
- 29:05concentric circles
- 33:05encapsulation
- 36:13domaindriven design
- 36:50objectoriented design
- 41:07functional programming
- 41:27user
- 42:26module
- 43:01Haskell
- 43:32Testability
- 45:15Testinduced damage
- 47:36Higherorder functions
- 50:06Unit tests
- 52:19Isolation
- 53:07Pure function
- 54:07Unit testing
- 55:00Isolation is important
- 55:44Opie is the problem
- 57:24Isolation vs testdriven development
- 58:14Writing pure functions
related talks
01h 03mFunctional Programming Patterns for Mere Mortals
46mWhy Care About Functional Programming
10mFunctional Programming for Everyone
01h 01mMoving IO to the edges of your app: Functional Core, Imperative Shell
25mA Guide To Functional Programming
01h 06mFunctional Design Patterns
42mStratified design and functional architecture
34m[Eng Sub]Is it Okay to Pursue Functional Programming on Frontend?
