Its simply creating a wrapper to call multiple methods .
You have an A
class with method x()
and y()
and B
class with method k()
and z()
.
You want to call x, y, z at once , to do that using Facade pattern you just create a Facade class and create a method lets say xyz()
.
Instead of calling each method (x,y and z) individually you just call the wrapper method (xyz()
) of the facade class which calls those methods .
Similar pattern is repository but it s mainly for the data access layer.