I am studying English now.
So the grammar of the writing can be wrong.
Please understand :)
The content of this article will be written about how I made my sample project.
Languages, libraries and tools used
- kotlin
- Dagger
- RxKotlin
- Retrofit, Okhttp3
- Gson, Glide
The architecture of the project consists of Clean Architecture + mvvm + Modularization as shown by the title.
This article is not about Clean Architecture, mvvm, Modularization
Architecture?
The modules were divided by layer presentation, domain, and data from Clean Architecture. It is not Clean Architecture, but there are additional app, buildSrc, and common modules.
1. data
This module serves to import local or remote data.
also This is the interface implementation of the domain layer.
This is a remote api code that requests movie data.
After calling remote api, convert it to an entity that fits the domain layer through MoviesMapper to return it.
2. domain
It handles overall business logic and defines user action, Namely UseCase. it also defines the interface of the data layer.
3. presentation
Presentation layer is highly Android dependent and means UI level.
4. app
The app layer corresponds to the platform property called Android. The main roles are application and DI lib(dagger)
The layers described eventually show dependencies as shown in the figure below.
Conclusion
It was able to increase productivity in development and to clearly identify where the code was in each role.
If you want to check the detailed code, you can check it here. :)