I have done this in the iOS app. VO objects are in-memory only and are converted to and from models. Vos are for json parsing and dislaying in the UI while models are only used for storing in the database.
Why? VOs can have lots and lots of properties, default values, null values, models can be dedicated to what we need to store in the DB, and that's it. 2 different purposes so 2 different models. Also, I have had issues in the past with older libraries like Realm where having models floating around in memory and being manipulated in the UI causes problems. Just having immutable VOs being passed around the app is no problem for any library and cheap!
I have done this in the iOS app. VO objects are in-memory only and are converted to and from models. Vos are for json parsing and dislaying in the UI while models are only used for storing in the database.
Why? VOs can have lots and lots of properties, default values, null values, models can be dedicated to what we need to store in the DB, and that's it. 2 different purposes so 2 different models. Also, I have had issues in the past with older libraries like Realm where having models floating around in memory and being manipulated in the UI causes problems. Just having immutable VOs being passed around the app is no problem for any library and cheap!