Clean architecture pattern Android

Viewed 2201

I have read several documents over clean architecture in general and Android specific as well.

I totally like the idea of creating a separate module for each new feature but my concern is how do I organize my data layer objects ? As I want them to be re-usable.

Should the data layer be a separate module alongside all the feature modules or the data layer should be broken down into components as modules ? eg. separate module for network, database etc ?

4 Answers

There are a lot of information around clean architecture/code etc.

Uncle Bob introduced Clean Architecture

The main idea is to not be depend on third-party dependencies(UI, frameworks, DB) to test it easy. It can be done using layers and following Dependency Rule(inner layers are independent of outer layers)

There are design patterns(MVC, MVP, MVVM, VIPER)[About] which usually solve a UI part

I would recommend to read the series of articles about Clean Architecture by Fernando Cejas:

Related