vendredi 5 août 2016

Create mapping between two large services with dozens of operations and entities with a lot of nesting elements

I have may be stupid question. At work we have two large services with a lot of operations(methods) and large request/responses. So right now we need to create some kind of bridge between this services and map request from one service to request of second one and do same thing with responses.

I'm not good in design patterns and I have not read "Design Patterns" gang of four. So of cause we can create a lot of builders/converters with mappings and custom logic. But this approach look too ugly for me right now.

I tried to use some mapping frameworks like Dozer. But in our case we have complex mapping(for example if value in request A equal to 1 then create and fill value bb in request B and if value equal to 2 then do something else).

So I want to hear some suggestions, may be someone can advice any good pattern or technique for this case. Or suggest any project that perfectly has solved same architectural problem.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire