Comparison
Facade patternvsWrapper
Facade pattern
you replaced eleven calls across four classes with one method, and callers stopped needing to know the order.
A single simplified entry point over a subsystem of several collaborating classes. Its intent is simplification rather than translation: the facade defines a new, smaller interface where the adapter conforms to an existing one, and it typically wraps many objects where the other wrappers wrap one. It does not hide the subsystem — callers who need the detail can still reach past it, which is the difference between a facade and a boundary.
Full entry →Wrapper
the object holds another object and forwards most calls to it, and which pattern that is depends entirely on why.
The shape shared by adapter, decorator, proxy and facade: an object that holds another and passes work through. Because the code looks nearly identical in all four, the name is chosen by intent — to change an interface, to add behaviour, to control access, or to simplify a subsystem — and that is exactly what the interview question is testing. Calling something a wrapper is honest when the intent is genuinely none of the four.
Full entry →