外观模式的作用,是对外提供一个统一的接口。如图所示:
看了图,一切尽在不言中。
为外部提供一个合适的接口,令人想起适配器模式。适配器模式和外观模式都是为方便统一调用而增加一个接口类,适配器是针对某一个奇形怪状的类,可能多个类就有多个适配器;而外观模式是为调用众多的类提供一个公共接口。