android-clean-architecture-boilerplate icon indicating copy to clipboard operation
android-clean-architecture-boilerplate copied to clipboard

Where should the data model for sending between activity/fragment stay.

Open arohim opened this issue 5 years ago • 2 comments

I have a question the data model that are using for sending between activity/fragment live?

the data model most likely domain's data model but it's can be serialized/Parcelized

arohim avatar Mar 19 '19 08:03 arohim

Sorry for late answer... I assume that you're talking about parcelable/serializable model objects which you will use only to transfer data between activities/fragments. As they contains limited data which won't be used to update/save model locally/remotely (so it is related only to presentation layer) I would add this there (I mean: in presentation module).

Think also about reusing once created viewModel which would have original data and which could be shared between fragments or activities (dependency injection thing ;-) ).

piotrek1543 avatar Apr 22 '19 20:04 piotrek1543

Ok, thank you.

arohim avatar Jun 11 '19 04:06 arohim