The domain layer is an optional layer that sits between the UI layer and the data layer . Figure 1. The domain layer’s role in app architecture. The domain layer is responsible for encapsulating complex business logic, or simple business logic that is reused by multiple ViewModels.