A facade is a structural design pattern that provides a simplified interface to a library, a framework, or any other complex set of classes.
If we try to understand this in simpler terms, then we can say that a room is a façade, and just by looking at it from outside the door, one can not predict what is inside the room and how the room is structured from inside. Thus, Façade is a general term for simplifying the outward appearance of a complex or large system.
In software terms, the Facade pattern hides the complexities of the systems and provides a simple interface to the clients.
This pattern involves one wrapper class which contains a set of methods available for the client. This pattern is particularly used when a system is very complex or difficult to understand and when the system has multiple subsystems.
Let’s see the below UML diagram,

Image source: Wikipedia
Here, we can see that the client is calling the Façade class which interacts with multiple subsystems making it easier for the client to interact with them.
However, it is possible that the façade may provide limited functionality in comparison to working with the subsystem directly, but it should include all those features that are actually required by the client.
For example, When someone calls the restaurant, suppose, to order pizza or some other food, then the operator on behalf of the restaurant gives the voice interface which is actually the façade for their customers.
Customers place their orders just by talking to the operator and they don’t need to bother about how they will prepare the pizza, what all operations will they perform, on what temperature they will cook, etc.
Similarly, in our code sample, we can see that the client is using the restaurant façade class to order pizza and bread of different types without directly interacting with the subclasses.
Now, it's time to dive into the real code.
This is the interface specific to the pizza.
public interface IPizza
{
void GetVegPizza();
void GetNonVegPizza();
}
This is a pizza provider class that will get pizza for their clients. Here methods can have other private methods that the client is not bothered about.
public class PizzaProvider : IPizza
{
public void GetNonVegPizza()
{
GetNonVegToppings();
Console.WriteLine("Getting Non Veg Pizza.");
}
public void GetVegPizza()
{
Console.WriteLine("Getting Veg Pizza.");
}
private void GetNonVegToppings()
{
Console.WriteLine("Getting Non Veg Pizza Toppings.");
}
}


Shekhar SharmaPosted Mar 1, 2026, 12:18 PM
I still did not understand why "Getting Non Veg Pizza Toppings" and "Getting Cheese." comes to output when RestaurantFacade class did not expose the private method of GetCheese() in BreadProvider and private method of GetNonVegToppings() in PizzaProvider.
Mohsin AzamPosted Nov 8, 2021, 1:12 PM
Very easy way of learning .. Good!
bassel IssaPosted Apr 8, 2019, 3:24 PM
I still can't find the good sense of when we should use the facade layer out of the article, can you give better explanation