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
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
1k
All About Angular's New Signal Forms
manfredsteyer
PRO
0
120
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
240
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.6k
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
230
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
110
CSC509 Lecture 04
javiergs
PRO
0
300
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
1k
GraphQL×Railsアプリのデータベース負荷分散 - 月間3,000万人利用サービスを無停止で
koxya
1
1.3k
CSC509 Lecture 06
javiergs
PRO
0
260
dynamic!
moro
10
7.4k
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
A designer walks into a library…
pauljervisheath
209
24k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
54
3k
The Cost Of JavaScript in 2023
addyosmani
54
9k
Building Better People: How to give real-time feedback that sticks.
wjessup
369
20k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
Producing Creativity
orderedlist
PRO
347
40k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Documentation Writing (for coders)
carmenintech
75
5k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
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