Hope you guys doing well.
I am currently working on Rest Application and I kind of need a suggestion. So I have multiple legacy Java applications(5-6) and currently writing the new application to handle all those as a integrated service layer.
So the structure is all old applications will make a individual REST call to new Application with request payload and will get the response back.
To addition to that, all the Requests and Responses payloads are not same and using different attributes.
and as per my lead, he said we need to use Strategy pattern for this new application so that there will be only one end point. My Question is: In one Model(class; getters & setters) I have 40-50 attribute so Json Payload is already too big and some of them are lists and as for now I need to make Models class for other 4 applications which is having other 40-50 attributes, but to achieve the goal I need to add all those into One Model Class for following the Strategy pattern is that good practices?
Instead of this we can make a different end-point to specific request and response, in this way Json Payload will be easy for refactoring and to handle for future perspective too?
Aucun commentaire:
Enregistrer un commentaire