The Facade pattern is intended to provide an unified interface to a set of interfaces in a subsystem. It defines a higher-level interface that makes the subsystems easier to use.

image In simple terms: this pattern is very useful when you have an great amount of scattered functionality available across a couple of class libraries and you want to provide an unified global point of access for your clients.

The only thing the client has to do is to create the facade class and call its method.


The facade class contains all subsystem classes with the necessary methods and provides a method which calls all necessary methods from the belonging subsystem classes.

The subsystem classes can be anything. For the sake of simplicity in this example they provide only the desirer method.

This post is part of a series on the foundational design patterns in C#. In this series we explore the ancient design patterns and their use in real-world programming situations of today. In these series of posts we explore each pattern by looking at a minimalistic example to reveal its structure and then look at more concrete and useful real-world C# code that implements the pattern.