C ++ design mode: Facade Pattern)

Source: Internet
Author: User

Definition: The appearance mode provides a unified interface to access a group of interfaces in the subsystem. The appearance defines a high-level interface to make the subsystem easier to use.

Example:

For example, our facade provides several simplified interfaces to encapsulate the sub-system functions, so that we can call these simplified interfaces to implement the desired functions. However, the appearance mode still exposes the complete functions of the system. We can not only operate on simplified interfaces, but also directly use advanced methods at the underlying Level of the operating system.

The appearance mode allows us to avoid tight coupling between customers and subsystems. Because our customersCodeIt is written for the appearance rather than for the subsystem. If your customer code was originally written for the appearance rather than for the subsystem, you do not need to change the customer code. You only need to modify the appearance code.

 

C ++ code is not used here.

 

Reference books: head first design model

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.