Android App Architecture Part 2: Domain Layer

In the previous article, we talked about the basics of Clean Architecture, MVVM, and app modularization. Then, we created a sample WeatherApp with initial package structure (core, WeatherApp, data, domain, feature, navigation module, Gradle files, etc.).

In this article, I’ll take you through the process of creating the first feature for data parsing from local JSON that’ll display the results to the user. We can simply call this feature weather.

Android App Architecture: Modularization, Clean Architecture, MVVM

Clean architecture is key

Based on my experience on previous projects, I decided to write an article on how to properly set up the base architecture of an android app which can be easily extended and applied to different kinds of applications.

The key concept that I’ll analyze in this series of articles involves the combination of Clean Architectureapp modularization and MVVM design pattern in creating modular, scalable and testable android application. For that purpose, I created a demo application called WeatherApp that will demonstrate this approach.

Data Boundaries Are the Root Cause of Maintenance Problems

Many designs and patterns old and new, like the Layered ArchitectureClean ArchitectureHexagonal Architecture, DCI, and others introduce data-oriented boundaries inside the application.

Data-oriented boundaries are interfaces between architectural parts that primarily consist of data in the form of "properties" that can be freely accessed either directly, through getter methods, reflection, or some other technical means.