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
56
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
220
Other Decks in Programming
See All in Programming
Kubernetesで実現できるPlatform Engineering の現在地
nwiizo
3
1.9k
Signal-Based Data FetchingWith the New httpResource
manfredsteyer
PRO
0
160
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
110
AI時代の開発者評価について
ayumuu
0
100
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
630
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
730
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
2.9k
スモールスタートで始めるためのLambda×モノリス
akihisaikeda
2
180
Rollupのビルド時間高速化によるプレビュー表示速度改善とバンドラとASTを駆使したプロダクト開発の難しさ
plaidtech
PRO
1
160
地域ITコミュニティの活性化とAWSに移行してみた話
yuukis
0
230
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
15
4.5k
SwiftUI API Design Lessons
niw
1
260
Featured
See All Featured
Statistics for Hackers
jakevdp
798
220k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
RailsConf 2023
tenderlove
30
1.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.6k
A better future with KSS
kneath
239
17k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
YesSQL, Process and Tooling at Scale
rocio
172
14k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
30k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Cult of Friendly URLs
andyhume
78
6.3k
BBQ
matthewcrist
88
9.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