Practical modularisation for
Android developers
Jordan Terry
1
Slide 2
Slide 2 text
Agenda
● Introduction
● What is modularisation?
● What is your codebase?
● Cohesion, Coupling & Gradle
● Build times
● Reusability
● Defining a strategy
● Questions?
2
Slide 3
Slide 3 text
3
Introduction
🇹
Then Now
2015 2018 2021
@JordNullable
Slide 4
Slide 4 text
What is modularisation?
4
Slide 5
Slide 5 text
5
What is modularisation?
Large system
Modules
Slide 6
Slide 6 text
6
Slide 7
Slide 7 text
7
Android modularisation
Large System
Modules
Codebase
Gradle
Modules
Slide 8
Slide 8 text
Talking about modularisation
8
Slide 9
Slide 9 text
The benefits of modularisation
9
Build Times Reusability
Slide 10
Slide 10 text
What is your
codebase?
10
● Define a way to measure
modularisation
● Apply that to your codebase
Slide 11
Slide 11 text
11
Monolithic Modular
What is your codebase?
You are somewhere here…
Slide 12
Slide 12 text
12
Monolithic
Modular
What is your codebase?
= code base with a module that takes more time to compile
than other modules
= code base with no modules that take more time to compile
than the sum of other modules
Slide 13
Slide 13 text
What is your codebase?
13
Monolithic Modular
Slide 14
Slide 14 text
14
Monolithic Very Modular
What is your codebase?
Modular
Slide 15
Slide 15 text
15
Slide 16
Slide 16 text
Cohesion, Coupling & Gradle
16
Slide 17
Slide 17 text
High Cohesion
Low Cohesion
Cohesion
17
Low Cohesion High Cohesion
Slide 18
Slide 18 text
High Coupling
Low Coupling
Coupling
18
Low Coupling High Coupling