Comparison
Pass-through methodvsPoltergeist
Pass-through method
the service method's whole body is a call to the repository method with the same name and the same arguments.
A method, or a whole layer, that does nothing but forward to the next one down, added because the architecture diagram said there should be a layer there. It is the shallow-module problem at its most literal: interface as wide as the thing it hides, and no complexity absorbed. A layer earns its place by doing something — a transaction, a translation, a policy — and if it does not, deleting it is a genuine improvement.
Full entry →Poltergeist
the class exists only to call one method on another class and then disappears, and it has Manager in its name.
A short-lived object with no state and no real responsibility, existing only to invoke something else. It usually arrives from applying a layering or naming convention mechanically — every entity gets a manager, every action gets a controller — and the work it appears to do belongs elsewhere. Deleting it and calling the real thing directly is nearly always the whole refactoring.
Full entry →