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
63
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
GitHub Actions × AWS OIDC連携の仕組みと経緯を理解する
ota1022
0
240
iOSアプリの信頼性を向上させる取り組み/ios-app-improve-reliability
shino8rayu9
0
150
WebエンジニアがSwiftをブラウザで動かすプレイグラウンドを作ってみた
ohmori_yusuke
0
170
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
920
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
CSC509 Lecture 03
javiergs
PRO
0
330
CSC305 Lecture 04
javiergs
PRO
0
250
Django Ninja による API 開発効率化とリプレースの実践
kashewnuts
0
930
Swift Concurrency - 状態監視の罠
objectiveaudio
2
450
ポスターセッション: 「まっすぐ行って、右!」って言ってラズパイカーを動かしたい 〜生成AI × Raspberry Pi Pico × Gradioの試作メモ〜
komofr
0
950
CSC509 Lecture 02
javiergs
PRO
0
400
iOS 17で追加されたSubscriptionStoreView を利用して5分でサブスク実装チャレンジ
natmark
0
580
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
32
2.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Optimizing for Happiness
mojombo
379
70k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
A better future with KSS
kneath
239
17k
Balancing Empowerment & Direction
lara
4
680
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
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