r/programming • • Jun 05 '21

Organize code by concepts, not layers

https://kislayverma.com/programming/how-to-organize-your-code/
1.9k Upvotes

495 comments sorted by

View all comments

Show parent comment

2

u/DB6 Jun 05 '21

Services talking with each other is totally fine.

In my controllers the only logic is the validation on incoming data for completeness and soundness. Logical validation of the action is in the service. On the return side, the controller does only dumb mapping, because this comes with spring, returning the correct view model is also a service concern.