android-clean-architecture-boilerplate
android-clean-architecture-boilerplate copied to clipboard
Will the presentation models always be useless?
Hello there. I was thinking after seeing a lot of repositories that usually the presenter or viewModel maps the domain models to presentation (there are no UI models) but this has a lot of problems (I shouldn't reference any platform resource, jetpack compose, etc). Even thinking in multiplatform this can be a huge problem.
Then I found this repo where I can see that the UI is separated from presentation so this problem is solved. But then I thought that really the presentation models will be the same than domain models.
Why should I keep the presentation models instead of using domain models directly until I reach the UI layer?
KISS .. keep it simple. IF you dont need those extra models, you can use the models from te domain without problems. In some cases . probably you would need a diferent object to load data in your view, because you have an adapter in your recyclerview, that is a case where you can create your own model inside of the presentation layer .
Yeah but you can use the UI models, I was talking about the presenter models. @mr-gil