What’s an Architecture?
An Architecture is a Code structure / collection of principles / patterns, that helps
better organise code in a project for easy maintenance and future changes. It also
enables you to have efficient test case coverages.
5
Slide 6
Slide 6 text
Architecture
Where does it come from? What Patterns / Principles
6
Slide 7
Slide 7 text
SOLID
Principles
7
Slide 8
Slide 8 text
Every class should have a Single
Responsibility
Single-Responsibility
8
Slide 9
Slide 9 text
Entities Should be Open for Extension,
Closed for Modification
Open-Closed
9
Slide 10
Slide 10 text
Let Φ(x) be a property provable about
objects x of type T. Then Φ(y) should be true for
objects y of type S where S is a subtype of T.
Liskov Substitution
10
Slide 11
Slide 11 text
Clients should not be forced to depend upon
interfaces that they do not use.
Interface Segregation
11
Slide 12
Slide 12 text
A class that uses a dependency, shouldn’t
create / know how to create that dependency
Depencency Inversion (IoC)
12
Slide 13
Slide 13 text
Layers
In an usual Android App
13
Slide 14
Slide 14 text
data
presentation
ui
domain (?)
cache
remote
Slide 15
Slide 15 text
data
presentation
ui
Slide 16
Slide 16 text
data
16
Repository
LocalDataStore
RemoteDataStore
AppService / ApiService DB