Summary

The Facade pattern is so named because it puts up a new front (a facade) in front of the original system.

The Facade pattern applies when

  • You do not need to use all of the functionality of a complex system and can create a new class that contains all of the rules for accessing that system. If this is a subset of the original system, as it usually is, the API that you create in new class should be much simpler than the original system's API.

  • You want to encapsulate or hide the original system.

  • You want to use the functionality of the original system and want to add some new functionality as well.

  • The cost of writing this new class is less than the cost of everybody learning how to use the original system or is less than you would spend on maintenance in the future.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.73.229