Understanding the layers of Clean Architecture

Understanding the various layers present in this architecture helps to achieve a code implementation that is clean and independent. I will outline the layers in the figure, but focus more on the Clean Architecture core conceptual rules: The Dependency Rule, Abstraction Principle, and communication between the layers:

  • Entities: Entities form the core of your app, which means they define what exactly your app is doing. Entities are basically objects created to make a data model to hold the business logic and the functionality that would be carried out on it. Some of the entities for an app could be a user entity, a restaurant entity, a place entity, and so on.
  • Use cases: Use cases are in the layer ...

Get Expert Android Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.