In an object-oriented language, the typical approach (and the best IMO) is to place the logic in the class itself, and not in the service class. It follows the principle of "say, do not ask", for example, informing the File about the removal of itself, and not ask any service to delete it. One of the main reasons for this is permission to inherit. For example, if you have a subclass of File and you want it to write a log message before deleting it, this would be difficult to do with the service class, because for each subclass you would need a different service class.
As for the service-oriented approach, this is usually considered at a higher level (that is, in a service-oriented architecture). Consider a financial reserve system, you may have a buy shares service and a sell shares service. Has a service class corresponding to individual classes (i.e., a stock service that knows how to buy and sell shares) will not be object oriented.
Your system may also have a service level that provides integration points with other external services (i.e. the database), but again, I donβt think this is what you are talking about. That way, I could take the approach to encapsulating logic in the File class itself.
source share