the facade pattern the facade pattern is designed to provide simple interface to complex system of components for complex taskswe may need to interact with these objects directlybut there is often "typicalusage for the system for which these complicated interactions aren' necessary the facade pattern allows us to define new object that encapsulates this typical usage of the system any time we want access to common functionalitywe can use the single object' simplified interface if another part of the project needs access to more complicated functionalityit is still able to interact with the system directly the uml diagram for the facade pattern is really dependent on the subsystembut in cloudy wayit looks like thisfacade +simple_task()(+other_simple_task(big system complex component another component facade isin many wayslike an adapter the primary difference is that the facade is trying to abstract simpler interface out of complex onewhile the adapter is only trying to map one existing interface to another let' write simple facade for an -mail application the low-level library for sending -mail in pythonas we saw in python object-oriented shortcutsis quite complicated the two libraries for receiving messages are even worse it would be nice to have simple class that allows us to send single -mailand list the -mails currently in the inbox on an imap or pop connection to keep our example shortwe'll stick with imap and smtptwo totally different subsystems that happen to deal with -mail our facade performs only two taskssending an -mail to specific addressand checking the inbox on an imap connection it makes some common assumptions about the connectionsuch as the host for both smtp and imap is at the same addressthat the username and password for both is the sameand that they use standard ports this covers the case for many -mail serversbut if programmer needs more flexibilitythey can always bypass the facade and access the two subsystems directly