Комментарии:
It's a good idea on design phase for protect your UI layer and for any purpose. I will suggest to mapping object for each layer following this sample if you design the object good enough and you have time to maintenance it. I found this pattern is hell for me on my side job (maintenance the existing object from the other)because they create multiple object with same properties and each object can change into the another Obj. It cause to updating more than 20file after add field just from 1 endpoint. Hope this helpful for someone.
ОтветитьThanks mitch you're always the best mentor for me in this universe. Day by day I always learn new things from you. You're really a gem man.
ОтветитьEn-ti-ti
ОтветитьGreat job
Ответитьthank you for the video, it was great as usual!
I was a bit disappointed for not having the English subtitles.
Is mapper part of domain or data layer? I want to make sure they are in correct package. Thanks
Ответитьthanks for this Mitch, still seeing this in 2022
Ответитьawesome but where is the English subtitle? |:
ОтветитьThanks!
ОтветитьJust an Engagement.
ОтветитьI found this video is quite helpful, but I have one question.. In what case will we use the domain to entity mapping? Entity to domain mapping is understandable because domain model should only contain what it needs. But how about entity to domain? What if we have 8 attributes in our entity and just 5 in our domain model? Thanks in advance.
ОтветитьSome engagement: this is engaging.
ОтветитьI might be a little bit late but really liked your tutorials :) engagement :)
ОтветитьThanks
ОтветитьAlthough I am late in this course but still "THIS IS YOUR ENGAGEMENT✨✨✨" .Keep it safe.
Ответитьhow to map to domain for single data or not List?
ОтветитьСпасибо! Very helpful!
ОтветитьThanks for the video, I also prefer custom mapper mechanism to the automatic one, but I prefer to do the map as extensions functions on business and network entities.
ОтветитьI don't really like the idea of the mapper interface. I think it confusingly suggests that each network model has a single corresponding domain model
ОтветитьWhy not use extention functions for mappers?
ОтветитьI'm following this course just after 3 months it was released, and so much has changed in just 3 months.
Need to follow the course and doc simultaneously.
Damn you Android
That's kind of weird that domain layer should know anything about network layer and it's models. Converters are required but they should be placed in a layer that requires it, and that is definitely not domain.
ОтветитьThanks a lot @CodingWithMitch
Ответитьengage engage...
ОтветитьGreat work, thanks!
ОтветитьI aprecciate how you always go back to a whiteboard to explain the concepts at a higher level before you deep dive into code. It's very easy to follow your reasoning.
Ответитьsome ENGAGEMENT
ОтветитьSome engagement
ОтветитьQuick tip, that has ended up saving me a lot of time: If you have the curser on a word in the code, you can press Ctrl + J, and it will highlight subsequent instances of the word, one per time you press the shortcut. Then, when you highlighted all the words you want, you can edit them all at once, and finally press escape to exit "multi line editing". When I saw you changing all the "entity" objects to "domainModel" one at a time, I thought to mention it. Maybe you already know, but here it is :) Thanks for the amazing content
ОтветитьRecipeDtoMapper implements DtoMapper, RecipeEntityMapper implements EntityMapper, and so on. What is your idea?
ОтветитьDtoMapper<Dto,Model> for net - EntityMapper<Entity,Model> for database(local)
ОтветитьSome ENGAGEMENT left...
ОтветитьI use lombok plugin for my model, well this is interesting if combining
ОтветитьAlways Like before watching videos. enough engagement with Mitch.
ОтветитьWell that is good piece of code.
I did the same thing using for each loop for transforming from one model into another. Map serves the same purpose.
Good work
Great video as usual Mitch. Thanks
ОтветитьIs that really needed? I'm working fine with a simple POJO. It could be useful if you want to change the way the API returns the data and make it easy to adapt without changing the UI.
ОтветитьGreate tutorial, can't wait for the next episode .... I'm just a little bit confuse about were should I put my logic code like if I am making a mathematical operation should it be in view model on in a repository
ОтветитьWhy should we use interface() instead of simple methods in the activity?
ОтветитьThe BEST android courses in the world confirmed
ОтветитьYou could name your network model RecipeDTO, DTO is abv for Data Transfer Object
ОтветитьMitch, I feel that mappers are used to inject business logic to the Entity Data so that we show refined data in the UI. I also feel that the fields in Domain Model should be non-null as they would be used by UI. Am I right?
Ответитьi didn't quire understand what does entity mapper and network mapper do , i could understand the conversion between both but why do we need mappers here , thank you for the answer in advance
ОтветитьWhy don't you just create a static method inside the view's model class that constructs that model from a different model (say a network model)?
ОтветитьNice video! Do you think that adding a video for testing the mapper class would be useful? Although straightforward, I think the content could fit for the beginners audience and it's something you would do in a real project.
ОтветитьWaiting for this thanks Mitch please make a video on scopped storage using jetpack compose
Ответить