Mike Herasimov Mike Herasimov - 17 days ago 6
Java Question

Android/Java best up to date mapper

In my Android app I need to perform some mappings between aplication layers. Mainly between DTOs and instances of domain classes.

So I've been looking for mappers, which could do my life easier, but most articles I have found are pretty old and they describes deprecated mappers oftentimes, like


  • Dozer

  • Nomin

  • Transmorph

  • Model Bridge



So far I found only 2 up to date mappers, such as


  1. mapStruct

  2. model mapper



I'm confused which one to choose and is there a better mapper, which will fit my needs?

Basically I need mapper with simple and understandable API, whithout tonns of ugly code which I'll need to write to work with it.

Answer

Well, in my project I use ModelMapper. It is simple to start. And it has nice documentation and broad functionality. Also, its advantage is in conventional mapping.

Here you will find plenty of examples using it.

EDIT: As I can see, you provided link to GitHub repository of this project in the question.