Facade Design Pattern
The facade design pattern allows us, to provide a simplified interface from multiple class libraries. It provides a simple interface that hides the complexity of the class libraries being used. UML Class diagram For example, if the client code needs to access three different class libraries for a single functionality, instead of having the client code accessing those 3 class libraries, we can just create another class, that calls the required class libraries and have the client access only the class that you have created. The result is a simplified interface for the client and the client will not need to know the details of the actual (three) class libraries. Real World Examples for Facade Pattern A MortgageApplication object, which provides a simplified interface to a large subsystem of classes measuring the credit worthiness of an applicant. Implementation of above example in C#.Net Create Customer class, public class Customer { private string _name; ...
Comments
Post a Comment