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
61
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
230
Other Decks in Programming
See All in Programming
Select API from Kotlin Coroutine
jmatsu
1
190
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.2k
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
850
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
310
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
250
Team operations that are not burdened by SRE
kazatohiei
1
180
Is Xcode slowly dying out in 2025?
uetyo
1
190
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
230
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
170
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
300
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
170
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
280
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Speed Design
sergeychernyshev
32
1k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Code Reviewing Like a Champion
maltzj
524
40k
Writing Fast Ruby
sferik
628
61k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Designing for humans not robots
tammielis
253
25k
Producing Creativity
orderedlist
PRO
346
40k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
670
Side Projects
sachag
455
42k
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