Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Preview Driven Development
Search
Rikin Marfatia
April 28, 2021
Programming
2
55
Preview Driven Development
Here are the slides for my talk at Android Worldwide.
Rikin Marfatia
April 28, 2021
Tweet
Share
More Decks by Rikin Marfatia
See All by Rikin Marfatia
State Machines and Hopeful Dreams
rahkeen
2
210
Other Decks in Programming
See All in Programming
時計仕掛けのCompose
mkeeda
1
280
定理証明プラットフォーム lapisla.net
abap34
1
1.7k
SRE、開発、QAが協業して挑んだリリースプロセス改革@SRE Kaigi 2025
nealle
3
4.1k
最近のVS Codeで気になるニュース 2025/01
74th
1
250
昭和の職場からアジャイルの世界へ
kumagoro95
1
350
Domain-Driven Transformation
hschwentner
2
1.9k
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
29
11k
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
130
Writing documentation can be fun with plugin system
okuramasafumi
0
120
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
670
Bedrock Agentsレスポンス解析によるAgentのOps
licux
2
720
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Scaling GitHub
holman
459
140k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Making Projects Easy
brettharned
116
6k
Become a Pro
speakerdeck
PRO
26
5.1k
Side Projects
sachag
452
42k
Code Reviewing Like a Champion
maltzj
521
39k
4 Signs Your Business is Dying
shpigford
182
22k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Transcript
Rikin Marfatia — Android @ Pinterest — @heyrikin Preview Driven
Development™ Avoid build times at all cost!
Agenda Compose + Previews 101 Previews —> Isolated Features Dependency
Fakes Gradle Strategy for Previews Real World Example
Compose + Previews
Jetpack Compose Declarative UI @Composable functions Previews for visualization Android
is fun again
@Previews
Deploy Previews to Device
Powerful in-IDE Support
Faster UI Development
Isolated Features
Isolated Features Built “isolated” from the rest of the application
Simulate inputs Stub out side effects + outputs
Mini Apps (Sample Apps) Run each feature as an app
Composition of features Setup for modularization
Other Benefits Feature Teams Easy Testing + Refactoring Non-engineers can
play with Previews
Faking Dependencies
Control your Environment Real Application Real Application - No Internet
Fake Feature
Real Dependencies are Expensive 💰💰💰 import InnocentDependency Retrofit OkHttp Room
SqlLite KAPT
Interface + Implementation
Gradle Strategy
Gradle Modules — Before App Feature Common Feature Feature Network
Gradle Modules — After App Feature NetworkLive Common Feature Feature
Network FeaturePreview FeaturePreview FeaturePreview
Interface + Live Modules App Feature NetworkLive Common Feature Feature
Network FeaturePreview FeaturePreview FeaturePreview
Full Application App Feature NetworkLive Common Feature Feature Network FeaturePreview
FeaturePreview FeaturePreview
Feature Preview App Feature NetworkLive Common Feature Feature Network FeaturePreview
FeaturePreview FeaturePreview
Demo
Takeways Previews are extremely powerful, start using them Separate interface/fakes
+ implementation in Gradle Having fast deployable features is AWESOME Long build times SUCK
How to apply this today? - Gradle structure works without
Compose / Previews - Ralf Wondratschek — Android at Square - Start Creating Fakes - Preparing for Compose - Adam Bennet — Migrating your design system
Credits / Resources - Point-Free - Designing Dependencies - Modeled
my talk after this series - Amazing resource - Attacking Build Times with Sample Apps - Bill Phillips @ Cash App - Demo Application Code - https:#//github.com/Rahkeen/Hail
Thanks @heyrikin