~/talk

How to Use Dependency Injection to Write Maintainable Software

Talkat Meeting C++ 2022 · 2022-11-17..11-19· [frontend-architecture]
slides:none on file

Shows concrete C++ patterns and tradeoffs for dependency injection: pass read‑only data as const refs, prefer value or span for sequences, inject behaviors with std::function or concepts for static polymorphism, and use factories to defer instantiation. Covers lifetime choices: std::shared_ptr vs unique/refs, aliasing constructor, Folly Observer for mutable shared data, and testing with Google Mock. Demonstrates wiring options and a holder/factory pattern that composes components without leaking implementation details.

AI-written summary · about

  1. 0:00Introduction
  2. 1:34Understanding dependency injection
  3. 5:39Passing dependencies
  4. 8:50Data dependencies
  5. 21:12Behavioral dependencies
  6. 30:07Wiring components
  7. 43:36Factories and lifecycle
  8. 52:56Abstraction and conclusion
~/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.