but sometimes we have nested DTO's ,like a movieDtO with list of CastDto and each CastDto holds a characterDto (like the movie database TMDb) . then mapping becomes complicated
you prolly dont care but if you're stoned like me during the covid times then you can watch all the latest movies and series on InstaFlixxer. I've been watching with my gf for the last couple of months xD
I have understood this structure but I still don't understand how it fits in with the use of repositories. Is a repository supposed to return a recipe? Otherwise wouldn't the application now be aware of the data source which is what the repository trying to decouple?
Great vid! Do you think having DTO, Entity and etc will result in many unnecessary adapter/converter extensions between these similar data classes? Wdyt? Especially if we add a custom view which takes in another data class, it will require maybe another set of extension functions to convert between the Entities between the UI data classes.
How to do this auto mapping? I think developers hate to do this stuff due to this manual mapping part which feels like redundant. I am using JSON to Kotlin extension for creating DTOs either using Gson or Moshi which really saves a lot of time but now with this manual mapping It becomes a burden.
Great video, thank you! That's why I commented about interfaces instead of data classes as domain models, you avoid the need of using Mappers because every Entity, Dto, Dao is going to be implementing the interface, so you just need to return de recipe interface on your methods instead of a specific implementation, but I think you're right, I don't know the scalability nor flexibility of my way, I'll switch to Mappers 😂, will you add UseCases to the project?
👌🏻 loving it now, dto is way better
but sometimes we have nested DTO's ,like a movieDtO with list of CastDto and each CastDto holds a characterDto (like the movie database TMDb) . then mapping becomes complicated
engagement 10
Come on people! Like the video! EVEN IF each person is watching this 5 or 10 times, likes would be much higher.
ya man wtf
You are the best Mitch.
The name that you just butchered lol is pronounced as M'ah-dee.
Endadgerment prolly spelled wrong
I'm glad to here that you are willing to do another project with jetpack compose 👍👍
you prolly dont care but if you're stoned like me during the covid times then you can watch all the latest movies and series on InstaFlixxer. I've been watching with my gf for the last couple of months xD
@Sage Cristian yup, have been watching on instaflixxer for years myself :)
@Sage Cristian yup, I've been watching on instaflixxer for since december myself :)
I don't know why are you bringing these irrelevant stuff into comments 😠😠😠
Great efforts, love the vids.
Thanks for the Wikipedia plug! We should support these things.
Please add unit testing video at the end of the series. So it will be a complete meal.
RecipeDto for network(data transfer object)
RecipeEntity for database
Recipe for domain
I have understood this structure but I still don't understand how it fits in with the use of repositories. Is a repository supposed to return a recipe? Otherwise wouldn't the application now be aware of the data source which is what the repository trying to decouple?
Great vid 💪
Nice
Great vid! Do you think having DTO, Entity and etc will result in many unnecessary adapter/converter extensions between these similar data classes? Wdyt?
Especially if we add a custom view which takes in another data class, it will require maybe another set of extension functions to convert between the Entities between the UI data classes.
No everything comes from the use cases or repository. All the conversions are done by the time the model gets to the viewmodel
There is also a cool shortcut SHIFT+F6, instead of right click -> refactor -> rename.
Looking at this right now I saw that your DTO was mutable ,I think it best immutable for safety and data consistency
Mitch.. How are you? 😎
Good thanks for engagement
Hi mitch, i wanna ask you a question. Why don't we use auto mapper in this case but making a lot of efforts to map models manually like that?
How to do this auto mapping? I think developers hate to do this stuff due to this manual mapping part which feels like redundant. I am using JSON to Kotlin extension for creating DTOs either using Gson or Moshi which really saves a lot of time but now with this manual mapping It becomes a burden.
i'm in love with your tutorials
thanks mitch...
Thanks Mitch
First
Congratulations
nice
Thanks
Thanks for doing this
Thank you so much.
Very nice video
Great video, thank you! That's why I commented about interfaces instead of data classes as domain models, you avoid the need of using Mappers because every Entity, Dto, Dao is going to be implementing the interface, so you just need to return de recipe interface on your methods instead of a specific implementation, but I think you're right, I don't know the scalability nor flexibility of my way, I'll switch to Mappers 😂, will you add UseCases to the project?
Next project is use cases
@@codingwithmitch sweet!
Could you skip setting up retrofit in your future videos. You have shown that umpteen number of times.