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
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
4
1.3k
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
130
『品質』という言葉が嫌いな理由
korimu
0
160
昭和の職場からアジャイルの世界へ
kumagoro95
1
350
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
260
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
120
Linux && Docker 研修/Linux && Docker training
forrep
23
4.5k
チームリードになって変わったこと
isaka1022
0
190
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
240
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
230
【PHP】破壊的バージョンアップと戦った話〜決断と説得
satoshi256kbyte
0
120
Software Architecture
hschwentner
6
2.1k
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
How GitHub (no longer) Works
holman
313
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
The Language of Interfaces
destraynor
156
24k
Code Review Best Practice
trishagee
66
17k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
GraphQLとの向き合い方2022年版
quramy
44
13k
Faster Mobile Websites
deanohume
306
31k
Making Projects Easy
brettharned
116
6k
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