-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathREADME.md
More file actions
33 lines (20 loc) 路 3.09 KB
/
Copy pathREADME.md
File metadata and controls
33 lines (20 loc) 路 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Android Multimodule Architecture Concepts
[](http://kotlinlang.org)
[]()
_Android Multimodule Architecture Concepts_ is a showcase of two MVVM multi-modular concepts (_Android Layered Architecture_ and _Android Clean Architecture_) 馃彌 to developing clean, testable and scalable Android Apps 馃摫
馃攷 The architecture proposed consist of 3 different layers:
* **Presentation layer**: contains all the Android UI framework components (e.g. Activities, Fragments, ViewModels...) and the related resources (e.g. images, strings...).
* **Domain layer**: contains the platform-independent business logic and models.
* **Data layer**: contains the repositories, the data sources api implementations and the corresponding api-specific models.
These layers are implemented using 3 separate modules to increase decoupling and separation of concerns. The dependencies between the modules are set so that the _data layer_ is completely invisible to the _presentation layer_ and vice versa.
## Architecture concepts 馃彌
The project hosts each architecture concept in a separate branch (this _main_ branch only contains an empty template).
馃攷 The proposed concepts are:
* [**Layered Architecture Concept**](https://github.com/davidepanidev/android-multimodule-architecture-concepts/tree/layered-architecture-concept): the dependency between the modules is <code>_presentation_ -> _domain_ -> _data_</code>. The 3 modules are Android modules. The visibility among the modules is shown by the picture below:
<img src="https://github.com/davidepanidev/android-multimodule-architecture-concepts/blob/layered-architecture-concept/pictures/layered%20architecture%20-%20modules%20dependencies.png" height="300">
* [**Clean Architecture Concept**](https://github.com/davidepanidev/android-multimodule-architecture-concepts/tree/clean-architecture-concept): the dependency between the modules is <code>_presentation_ -> _domain_ <- _data_</code>. The _presentation_ and _data_ modules are Android modules whereas the _domain_ module is a Kotlin library being the innermost platform-independent module. The visibility among the modules is shown by the picture below:
<img src="https://github.com/davidepanidev/android-multimodule-architecture-concepts/blob/clean-architecture-concept/pictures/clean%20architecture%20-%20modules%20dependencies.png" height="300">
* [**Clean Architecture Compose Concept**](https://github.com/davidepanidev/android-multimodule-architecture-concepts/tree/clean-architecture-compose-concept): branch of the [**Clean Architecture Concept**](https://github.com/davidepanidev/android-multimodule-architecture-concepts/tree/clean-architecture-concept) with the UI built with Jetpack Compose 馃殌.
## Screenshots 馃摳
The App retrieves data from the [CoinGecko API](https://www.coingecko.com/en/api) and shows the current most capitalized cryptocurrency (which of course is Bitcoin 馃槃).
<img src="screenshots/home.png" height="500">