Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will the presentation models always be useless? #59

Open
JavierSegoviaCordoba opened this issue Mar 8, 2020 · 2 comments
Open

Will the presentation models always be useless? #59

JavierSegoviaCordoba opened this issue Mar 8, 2020 · 2 comments

Comments

@JavierSegoviaCordoba
Copy link

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?

@JavierSegoviaCordoba JavierSegoviaCordoba changed the title Presentation models will be useless always? Will the presentation models always be useless? Mar 8, 2020
@mr-gilberto
Copy link

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 .

@JavierSegoviaCordoba
Copy link
Author

Yeah but you can use the UI models, I was talking about the presenter models. @mr-gil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants