~/talk

Async injection

Talkat NDC Copenhagen 2019 · 2019-03-27..03-29· [c-sharp, functional-programming]
slides:none on file

Claims a way to combine dependency injection with async/await without leaking async into domain code by treating async as a monad and moving impure operations to the system boundary. Shows C# code (Task, Lazy<T>, custom Maybe<T> monad, repository and HTTP controller), uses Select/SelectMany flattening and a match (aggregate) to avoid pulling values out, refactors a reservation system so domain logic stays synchronous and the async work stays at the edge, and demonstrates it compiles and runs.

AI-written summary · about

  1. 0:00Start
  2. 1:25How Do I Combine Dependency Injection with a Sink and a Weight without Leaky Abstractions
  3. 1:44Code Example
  4. 2:39Domain Logic
  5. 7:23Change the Return Types
  6. 9:30Final Changes
  7. 11:29How Do I Get the Value out of My Monad
  8. 12:13Zen and the Art of Motorcycle Maintenance
  9. 15:11Functor
  10. 15:59The Structure Preserving Map
  11. 16:34Structure Preserving Map
  12. 19:49Unit Containers
  13. 23:31Query Syntax
  14. 24:42What a Monad Is
  15. 40:33Aggregate Method
  16. 42:50How To Combine Dependency Injection with Async and a Weight without Leaky Abstractions
  17. 43:57Impure Operation
  18. 44:13Impure Operations
  19. 45:26Create Method
  20. 55:00Compiler Warning
  21. 57:54Clean Up the Code
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.