Prasanna Wamanacharya wrote:... is it fair to say that a Facade simplifies the interface between two sub-systems (an existing sub-system and a system under development).
Prasanna Wamanacharya wrote:A Mediator on the other hand keeps objects in a sub-system from referring to each other explicitly i.e. it avoids coupling within a sub-system
Prasanna Wamanacharya wrote:Except the fact that Facade is a structural pattern, and Mediator is a behavioral pattern, both the patterns look very similar to me.
I hope that we won't get both of them as choices in a question, and asked to choose one of them as the correct answer.
In fact, if you care much about a pattern's structure, then strategy, command and state patterns are almost the same one: you inject a behavior or another to a receiver class. Would you say the three patterns are the same one?