I'm trying to move some legacy code to multilayered architecture.
Let it be a REST Api for example, for simple resources the request goes this route: controller -> service -> business layer -> data layer.
Now the same app receives data via webhooks (state updates for entities which should be persisted on Entity) from different services, every service has it's data format.
First question: Which layer should transform received data? Should I put processing in Controller? ||
Should I have a custom method on the MyEntityService, should I create a different service that will handle processing?
Aucun commentaire:
Enregistrer un commentaire