Overview
Data Layer
The data layer of an app contains the business logic. The business logic is what gives value to our app—it's made of rules that determine how our app creates, stores, and changes data.
-
Database and Migrations
-
DAOs and Repositories
-
Centralising changes to the data
-
Abstracting sources of data from the rest of the app
Domain Layer
The domain layer is responsible for encapsulating complex business logic, or simple business logic that is reused by multiple Clients. To keep these controllers simple and lightweight, each use case should only have responsibility over a single functionality, and they should not contain mutable data. You should instead handle mutable data in your UI or data layers.
-
Controllers and CRUDs
-
Testability of the app
-
Avoids code duplication
-
Split responsibilities
-
Authorization, authentication and routing end-points
UI Layer
The role of the UI is to display the application data on the screen and also to serve as the primary point of user interaction.
-
Basic UI elements
-
Pre-built UI elements and utilities
-
Events, data and state flow
-
Components and view models
-
Threading and concurrency
-
Network Calls and DTOs
-
Show in-progress operations
-
Show errors on the screen
-
Navigation