Chapter 6 — Components, Scopes, and Lifecycle
- 6.1 The Component Hierarchy
- 6.2 Components, Scopes, and Lifetimes
- 6.3 Scoped vs Unscoped: the Default You Keep Forgetting
- 6.4 Matching Scope to Lifecycle (and the Leaks You Avoid)
- 6.5 What Each Component Gives You for Free
- 6.6 A Worked Scope Decision for Verdant
- 6.7 Pitfalls & Misconceptions
- 6.8 What’s Ahead
Chapter 2 — Dependency Injection by Hand
- 2.1 The Composition Root
- 2.2 Wiring Verdant by Hand
- 2.3 The Android Problem, Up Close
- 2.4 Scoped Containers
- 2.5 A Tempting Detour: the Service Locator
- 2.6 Why This Doesn’t Scale
- 2.7 Pitfalls & Misconceptions
- 2.8 What’s Ahead
Chapter 3 — The Concepts Frameworks Formalize
- 3.1 The Object Graph
- 3.2 Bindings
- 3.3 Scope and Lifetime
- 3.4 Lifecycles: the Android Boundaries That Matter
- 3.5 Qualifiers
- 3.6 The Seam: Injecting Into Objects You Don’t Construct
- 3.7 One More Axis: When the Graph Is Checked
- 3.8 The Vocabulary, Mapped
- 3.9 Pitfalls & Misconceptions
- 3.10 What’s Ahead
Chapter 4 — Hilt Fundamentals
- 4.1 The Shape of What We’re Building
- 4.2 Setup
- 4.3
@HiltAndroidApp: the Generated Composition Root - 4.4
@InjectConstructors: Teaching Hilt to Build Your Classes - 4.5 The Minimum Module (a Preview of Chapter 5)
- 4.6 Entry Points:
@AndroidEntryPoint - 4.7
@HiltViewModel: Retiring the Factory - 4.8 What Hilt Actually Generated
- 4.9 Pitfalls & Misconceptions
- 4.10 What’s Ahead
Chapter 5 — Modules and Bindings
- 5.1 What a Module Is
- 5.2
@Provides: Building Types You Don’t Own - 5.3
@Binds: Choosing an Implementation for an Interface - 5.4 Choosing Between
@Bindsand@Provides - 5.5 Qualifiers: Telling Two Bindings Apart
- 5.6 Organizing Modules as the App Grows
- 5.7 Pitfalls & Misconceptions
- 5.8 What’s Ahead
Chapter title
Chapter 7 — Hilt in Production
- 7.1 ViewModels with Runtime Values: SavedStateHandle and Assisted Injection
- 7.2 Injecting a Worker: Verdant’s Watering Reminder
- 7.3 Navigation-Scoped ViewModels
- 7.4 Hilt in a Multi-Module Project
- 7.5 Testing a Hilt App
- 7.6 Pitfalls & Misconceptions
- 7.7 What’s Ahead
Chapter 8 — Koin Fundamentals
- 8.1 The Koin Mindset
- 8.2 Setup
- 8.3 Starting Koin: the Composition Root
- 8.4 The Module DSL: single, factory, and get()
- 8.5 The Constructor DSL: Less Boilerplate
- 8.6 Retrieving Dependencies
- 8.7 Compile-Time Hilt vs Runtime Koin, Made Concrete
- 8.8 Pitfalls & Misconceptions
- 8.9 What’s Ahead
Chapter 9 — Scopes, Lifecycle, and Android Integration
- 9.1 ViewModels in Compose
- 9.2 Runtime Values: Parameters and SavedStateHandle
- 9.3 Non-ViewModel Injection in Compose
- 9.4 Koin Scopes
- 9.5 Qualifiers: named()
- 9.6 Pitfalls & Misconceptions
- 9.7 What’s Ahead
Chapter 10 — Koin in Production
- 10.1 Organizing Modules at Scale
- 10.2 Koin Annotations: Codegen and a Safety Net
- 10.3 Injecting a Worker with Koin
- 10.4 Testing and Verifying the Graph
- 10.5 Why Teams Choose Koin: Kotlin Multiplatform
- 10.6 Pitfalls & Misconceptions
- 10.7 What’s Ahead
Chapter 11 — Runtime vs Compile-Time: Debugging and Verifying Your Graph
- 11.1 The Same Bug, Two Timelines
- 11.2 Reading Hilt (Dagger) Errors
- 11.3 Reading Koin Errors
- 11.4 Moving Koin’s Check Earlier
- 11.5 Guardrails: a Practical Setup
- 11.6 A Debugging Workflow for Each
- 11.7 Pitfalls & Misconceptions
- 11.8 What’s Ahead
Chapter 12 — Choosing Between Them (and Migrating)
- 12.1 Head to Head
- 12.2 When Hilt Is the Right Call
- 12.3 When Koin Is the Right Call
- 12.4 A Decision Guide
- 12.5 Migrating Between Them
- 12.6 Pitfalls & Misconceptions
- 12.7 Closing
