--

Well said. The clue is in the name of that service class: UserService. What does it do? Who knows. It’s just begging to become a logic dumpster as you called it. A class called UserFinder on the other hand is much clearer semantically and I’ll bet has far fewer dependencies. Keep classes small and meaningful also keeps them unit testable. Win win.

--

--

Andrew Scott Chapman
Andrew Scott Chapman

Written by Andrew Scott Chapman

Senior Software Engineer, terrible but enthusiastic table tennis player.

Responses (2)