Issue
I have seen in some codebases that they are using mapper layer with usecase and repo layers. We can have the mapper logic inside the use case layer right? or is there any specific reason why we need that layer?
Solution
Yes, you can, but it's usually a good idea to user a mapper. Mapper is not MVVM specific, the reason to use the mapper pattern is to isolate the logic making it easier to test and reuse the conversion logic in other classes if necessary.
Answered By - william xyz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.