My team started a new Golang microservices project. Previously, we used monolith Laravel. We're on a discuss to determine the best design pattern we can implement and decided to use Repository Service pattern.
But there are 2 approaches that my team faces. Here's how the patterns look like:
First approach: Route -> Controller -> Service -> Controller -> Repository -> Controller -> Response
Second approach: Route -> Controller -> service -> Repository -> Service -> Controller -> Response
What I want to ask is which pattern I should follow, considering the maintainability, performance, etc.
Thanks in advance! Feel free to add some comments if my question needs to be adjusted.
Aucun commentaire:
Enregistrer un commentaire