Stop Calling Every Class a Service
The word "service" became a dumping ground for behavior that did not fit anywhere else. I have seen service classes that calculated tax, parsed CSV, emailed users, and decided which records could be deleted. None of those responsibilities became clearer because the file ended in Service.cs.
Names are part of architecture. InvoiceCalculator, CsvParser, and DeletionPolicy tell a reader what they own and what they do not. CommonService tells the reader to open the file and hope for the best.
This matters when a team grows. A developer looking for a rule needs a predictable place to find it. If every change requires searching fifteen generic services, the codebase has already lost some of its navigability.
There is a useful distinction between an application operation and a domain rule. An application operation coordinates steps: load data, apply rules, commit, publish an outcome. The rule itself should usually not know about HTTP status codes, transactions, or message transport.
I like a thin orchestration layer and explicitly named policies. This is not a command to create elaborate domain models everywhere. Straightforward CRUD remains straightforward CRUD. The point is to stop confusing orchestration with calculation just because both happen in the backend.
Before introducing another SomethingService, try completing this sentence: "This component is responsible for..." If the answer contains three unrelated verbs, split the responsibilities before debating patterns.
Top comments (0)