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
Domain layer entities need to be parcelable #1
Comments
No, in that case, you need to create models in the presentation layer, and do conversions between layers using data mappers. Domain models shouldn't know anything about parcelables, or Room (in case you save it to a database), or Json (in case you parse it from the server)... All that needs to be transformed between layers. |
@antoniolg thanks, I have entities at framework level for Server responses & models at domain level can I use any of it for my use in presentation layer or do I have to create new ones for presentation layer only? If you have any article on data mappers (the easy & correct way) please provide that too. |
Hello ! :D |
I don't think it's strictly necessary, only when it's required. But if you do it, it's not bad either. |
HI @antoniolg, great work. I wanted to know domain layer entities are needed to be parcelable in order to pass between activities/fragments. But when we declare them parcelable we will need to convert this module from "java-library" to android library or something. How to handle this case. You don't need that in this case but please help me solve this issue.
The text was updated successfully, but these errors were encountered: