18
Middle Man
Symptom
A class whose methods all delegate straight through to another object — no decisions, no transformations.
Goal
Callers talk directly to the real object; trivial passthroughs are deleted.
Smellier version
class Manager {
reports() {
return this.team.members();
}
}Fresher version// Expose team directly when the wrapper adds nothing.
manager.team.members();Savings
Fewer files, shorter call stacks, the implementation's location is obvious.
Note
An entire layer of indirection that adds no value; readers must follow every call to the real implementation.