Cork: Thumbtack's Android UI Framework
Article Summary
Dominic Zirbel from Thumbtack reveals how they modernized 300+ Android screens without a complete rewrite. Their new framework cut code by 30% while maintaining production stability.
Thumbtack's Android team faced a common challenge: their 2018 RxJava-based MVP architecture worked but couldn't leverage modern Android tools like Jetpack Compose and Coroutines. They built Cork, an opinionated MVVM framework that wraps modern Android components with guardrails to ensure consistent, performant implementations across their two consumer apps.
Key Takeaways
- Cork enforces immutable state models and unidirectional data flow using Compose
- Screen migrations reduced codebase by 30% compared to legacy RxArch implementation
- Framework uses object-oriented CorkViews instead of standard top-level Composables
- Migration strategy requires full screen rewrites, not component-by-component changes
- Custom navigation wrapper integrates Compose NavGraph with legacy View stack
Thumbtack successfully modernized their Android architecture by creating an opinionated wrapper around standard components that prevents common pitfalls while enabling incremental adoption.
About This Article
Thumbtack built RxArch as an MVP architecture in 2018, before modern Android components were available. It had real problems with presenter lifecycles during configuration changes and needed to serialize the entire UIModel, which made persisted Bundles unnecessarily large.
Cork uses Jetpack ViewModel to handle lifecycle management and Coroutines instead of RxJava for scheduling. The UI layer uses Compose for declarative binding. The framework is opinionated by design, which limits architectural choices but enforces best practices.
When the team migrated several screens from RxArch to Cork, they saw about 30% fewer lines of code. The team was satisfied with the results and successfully deployed at least one screen built with Cork to production.