Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Android code scalability
Search
Dionysis Lorentzos
March 29, 2018
Technology
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android code scalability
Dionysis Lorentzos
March 29, 2018
More Decks by Dionysis Lorentzos
See All by Dionysis Lorentzos
Jenkins pipelines working for your quality
diolor
0
110
Introduction in Android Wear and Watchfaces
diolor
0
32
Other Decks in Technology
See All in Technology
スプシの手作業からの解脱 ~更新はClaude Codeに、見せ方と使い方はGASアプリに任せる~
kentarofujii
0
150
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
1.7k
その Valkey 使いこなしていますか?
onk
PRO
5
1.5k
WasmをRustにする
sansantech
PRO
0
250
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
4
1.1k
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
290
Classmethod Company Deck
satoshi7
1
680
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
110
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
190
re:Invent初参加で変わったこと、2回目にやってみたいこと(JAWS-UG彩の国埼玉 #12)
mhrtech
2
220
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
ラッコキーワード サービス紹介資料
rakko
1
5.3M
How to Talk to Developers About Accessibility
jct
2
580
Accessibility Awareness
sabderemane
1
250
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
We Are The Robots
honzajavorek
0
400
The SEO Collaboration Effect
kristinabergwall1
1
590
Agile that works and the tools we love
rasmusluckow
331
22k
Transcript
Code Scalability
@diolor bit.ly/cd-scalability
Goal: Be ready for the next 20 people in your
team
None
TEAM SIZE Android devs 0 3 6 9 Q1 2015
Q1 2016 Q1 2017 Q1 2018
What do we get paid to do?
Build new features, fast & with quality Iterate existing features,
fast & with quality Build new features, fast & with quality Iterate existing features, fast & with quality
Increase development speed Reduce bugs FAST & WITH QUALITY
Unit test coverage 2% …BACK IN JANUARY 2016 Lints 700+
2% -> 20% 700+ -> <20
HOW TO REDUCE LINTS? Build Passed Build Failed Build Skipped
d Passed Build Failed Build Skipped Build Passed Build Failed Build Skipped Build Skipped Build Passed Strict CI Lint rules
How to reach 20% Unit test coverage?
MVC MODEL VIEW CHAOS
UI DOMAIN DATA BUSINESS RULES & LOGIC REMOTE & LOCAL
DATA
DATA LAYER Get or set data to the backend (e.g.
Api clients) Get or set data to our local storage (e.g. Databases)
API CLIENT VEHICLE REPOSITORY VEHICLE A VEHICLE B DATA LAYER
API CLIENT VEHICLE A VEHICLE B VEHICLE REPOSITORY DATA LAYER
VEHICLE A VEHICLE B API CLIENT VEHICLE REPOSITORY VEHICLES DATA
LAYER
API CLIENT VEHICLE REPOSITORY DATABASE SHARED PREFS DATA LAYER
Business logic: Combine the data from the data layers No
Android classes DOMAIN LAYER
LOGGED IN? FAVORITES FAVORITES INTERACTOR VEHICLES GAS STATIONS DOMAIN LAYER
FAVORITES INTERACTOR STATE OR ACTION DOMAIN LAYER FAVORITES
UI LAYER (MVP) VIEW (e.g. Activity)
PRESENTER VIEW (e.g. Activity) UI LAYER (MVP)
PRESENTER STATES ACTIONS VIEW (e.g. Activity) UI LAYER (MVP)
PRESENTER VIEW STATE VIEW (e.g. Activity) UI LAYER (MVP)
PRESENTER CALLBACKS VIEW (e.g. Activity) UI LAYER (MVP)
PRESENTER VIEW (e.g. Activity) ANDROID CODE PURE JAVA CODE UI
LAYER (MVP)
UI DOMAIN DATA PRESENTERS VIEWS API CLIENTS REPOSITORIES INTERACTORS DATABASE
PURE JAVA UNIT TESTABLE CODE
UI DOMAIN DATA PRESENTERS VIEWS API CLIENTS REPOSITORIES INTERACTORS DATABASE
Interface between layers: RxJava 1 RxJava 2 Callbacks Different language
20% unit test coverage
2017: How about 40%?
None
None
PRESENTER INTERACTOR API A Activity API B
PRESENTER PRESENTER INTERACTOR INTERACTOR API A API B Activity
Activity onStart() onStop() onStart() onStop() onStart() onStop() PRESENTER PRESENTER INTERACTOR
INTERACTOR API A API B
interface ! { fun onStart() fun onStop() } Hint: The
compiler doesn’t like !. Will not compile.
class MyActivity : Activity() { }
class MyActivity : Activity() { val !s = ArrayList<!>() }
class MyActivity : Activity() { val !s = ArrayList<!>() override
fun onStart() { !s.forEach { it.onStart() } } }
class MyActivity : Activity() { val !s = ArrayList<!>() override
fun onStart() { !s.forEach { it.onStart() } } override fun onStop() { !s.forEach { it.onStop() } } }
class CustomView: FrameLayout( ) { }
class CustomView: FrameLayout( ) { } interface ! { fun
onStart() fun onStop() }
class CustomView: FrameLayout( ), ! { override fun onStart() {
} override fun onStop() { } }
class CustomView: FrameLayout( ), ! { override fun onStart() {
"# call presenter start } override fun onStop() { "# call presenter stop } }
class CustomView: FrameLayout( ), ! { init { (context as
MyActivity). !s.add(this) } override fun onStart() { "# call presenter start } override fun onStop() { "# call presenter stop } }
class CustomView: FrameLayout( ), ! { init { (context as
MyActivity) . ! s.add(this) } override fun onStart() { "# call presenter start } override fun onStop() { "# call presenter stop } } class MyActivity : Activity() { val !s = ArrayList<!>() override fun onStart() { !s.forEach { it.onStart() } } override fun onStop() { !s.forEach { it.onStop() } } }
None
100% tested business logic
What if they were submodules?
GRADLE BUILD TASKS
GRADLE BUILD TASKS
20+ Submodules
20+ Submodules
Centralize dependencies /buildSrc/
Centralize dependencies /buildSrc/src/main/java object versions { val kotlin ="1.2.30" }
Centralize dependencies /buildSrc/src/main/java object versions { val kotlin ="1.2.30" }
object libraries { object kotlin { val reflect = "org.jetbrains.kotlin:kotlin-reflect:${versions.kotlin}" val stdlib = "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" } }
Centralize dependencies dependencies { implementation libraries.kotlin.stdlib }
Scalable code?
REDUCE BUGS Reduce bugs Increase speed
Reduce bugs 40+% tested code | 100% business logic 99,99%
crash free rate Isolated code which reduces domino bugfixes REDUCE BUGS
Low overlap between features Legacy code easier migrated If we
had suddenly 20 devs, the code is completely isolated INCREASED SPEED
Thank you! @diolor