Rethinking UI: Imperative to Declarative
summary
Argues that Jetpack Compose (alpha) with SwiftUI and React cuts boilerplate and bugs by letting code declare UI from state instead of imperatively mutating views, showing examples where a simple "Hello world" takes ~20 lines in XML/RecyclerView but far less with composition. Explains unidirectional data flow, compiler diffing (virtual-DOM–style partial updates), recommends moving UI state into ViewModel/single source of truth, using Kotlin Flows, MaterialTheme and preview annotations to ease migration and testing.
AI-written summary · about
chapters (24)
- 0:00Introduction to talk
- 0:15Current UI development challenges
- 5:28What is declarative programming
- 6:10Declarative UI frameworks overview
- 8:55Benefits of declarative UIs
- 11:01Issues with imperative UI
- 12:25State management in declarative UIs
- 15:54Unidirectional data flow explained
- 17:20State representation in UIs
- 21:10Tree updates in declarative UIs
- 22:55Performance trade-offs in declarative UIs
- 24:38Preparing apps for Jetpack Compose
- 27:27Q&A on Jetpack Compose stability
- 28:57Jetpack Compose vs Data Binding
- 30:44Testing in Jetpack Compose
- 33:36Adopting Jetpack Compose in production
- 35:00State management with Kotlin Flows
- 36:46Accessibility in declarative UIs
- 37:50Theming and styling in Jetpack Compose
- 38:33Design layout preview in Compose
- 39:37Adoption considerations for Compose
- 41:23Compose internals and coroutines
- 42:05Architecture migration for Compose
- 43:13Closing remarks and Q&A
