Functional Networking
summary
Argues that refactoring a network layer into pure functions makes requests composable and testable, and demonstrates concrete tools and results: use of algebraic types like Either to eliminate impossible states, a suspended-effect type IO to turn callbacks into lazy values, an environment-based configuration so dependencies are injected, and a generator called both-openapi that creates a Swift package (installable via brew) which keeps client code in sync and supports retry policies including a maximum of ten retrials.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:58Backend Services
- 1:40Data Models
- 2:39Send
- 3:20Callback
- 4:49Parametric Polymorphism
- 5:38algebraic data types
- 6:27IO data type
- 7:58Environmental effect type
- 8:32Refactoring functions
- 9:47OpenAPI
- 10:17Brew
- 10:45Invoke
- 11:16Test
- 12:50Why Bo
- 14:14Combine
- 14:41Conclusion
related talks
20mKick your 3rd party networking library to the curb
10mDeclarative Networking with Combine
27mGeneric Protocols and Associated Types - Power Tools for Unit Testing
22mEvent driven networking for Swift
05mSwift Superpowers #2
46mGeneric Swift: It Isn't Supposed to Hurt
55mEmerging Best Practices
32mFrom Problem To Solution
