frank
02/07/2017, 11:32 PMResponse
class, containing everything for that specific endpoint, so each class has exactly what it needs, which unfortunately causes a lot of duplicate code. Would it be better to just create single classes for the most important ones, put every possible field in there, and just reuse this? Below is the Response
for the newest endpoint I just added.frank
02/07/2017, 11:33 PMfrank
02/07/2017, 11:36 PMmodel
class and a mapper that maps the response to a model. This model class is basically just a somewhat simplified version which is used on the presentation side, removing complexity and nesting. For example a list of images with size fields 'small', 'large', 'extralarge', will then just be imageUrlSmall
and imageUrlLarge
directly in the model class.frank
02/07/2017, 11:37 PMfrank
02/07/2017, 11:40 PMmg6maciej
02/08/2017, 12:02 AMmg6maciej
02/08/2017, 12:03 AMigor.wojda
02/08/2017, 12:06 AMmg6maciej
02/08/2017, 12:07 AMfrank
02/08/2017, 12:13 AMGeneralArtistEntity
, but I'm wondering whether this is a good idea.frank
02/08/2017, 12:13 AMmg6maciej
02/08/2017, 12:13 AMfrank
02/08/2017, 12:15 AMmg6maciej
02/08/2017, 12:15 AMmg6maciej
02/08/2017, 12:15 AMmg6maciej
02/08/2017, 12:16 AMmg6maciej
02/08/2017, 12:16 AMmg6maciej
02/08/2017, 12:18 AMmg6maciej
02/08/2017, 12:18 AMfrank
02/08/2017, 12:19 AMfrank
02/08/2017, 12:19 AMfrank
02/08/2017, 12:19 AMmg6maciej
02/08/2017, 12:20 AMmg6maciej
02/08/2017, 12:21 AMfrank
02/08/2017, 12:21 AMfrank
02/08/2017, 12:21 AMmg6maciej
02/08/2017, 12:23 AMGeneralArtistEntity
is what I would receive from API and then most likely model for that, or few models, but that depends on how this data is used on different screens.mg6maciej
02/08/2017, 12:25 AMmg6maciej
02/08/2017, 12:25 AM