android10 / android10/Android-CleanArchitecture

Question: prepare data for presentation layer

Open
#154 5 comments 1 reaction 0 assignees View on GitHub
discussion question
Dominant language
Java
Stars
15.5k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

Hi,

i am trying to adopt ideas from clean architecture to my app and have following question:
In my view i have to show a summary of data calculated from different entities. I dont know where to do the calculation stuff.
1. calculate in data layer, so domain will only pass through to presenatation layer, so whats the benefit of domain layer?
2. get data/entities from data layer and calculate in domain layer and pass then to presentation layer, how to take benfit here from sql and retrieving a summary in a performant way?
3. get data/entities from data and domain and pass to presentation layer and do the calculation there, every new presentation/view have to do this job.

Is there other options, is there a best practice for such a usecase?
Thanks for any advice.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.