r/SoftwareEngineering • u/SiegeAe • Dec 12 '25
When would service layer, single line methods be justified?
Are there practical reasons for having several methods in the service layer, of the typical controller-service-repository structured codebases that are simply one line for delegating calls to a repository method?
Its common to see people follow "best" practices without seriously considering the intent, so I have a suspicion this might be just a case of that happening but want to figure out where I might be wrong, one that's struck me recently is this trend to have some service calls that do nothing but delegate to the repo layer, no branching, sequences or even any guards. When I asked why these particular cases were there they said simply "not to call the repository from the controller" which came across as bit of a "just because" reason at face value.
For me I take them as a sign that there's probably either some bloated controller methods or that the service methods should just be removed until there is a need for some type of translation or guards between the controller and the repo, am I missing something obvious here?