当前位置:网站首页>[designmode] facade patterns
[designmode] facade patterns
2022-07-07 16:36:00 【weixin_ forty-three million two hundred and twenty-four thousan】
Basic introduction
Appearance mode (Facade), Also called “ Process mode : A skin mode is a set of interfaces in a subsystem Provide a consistent interface , This pattern defines a high-level interface , This interface makes this subsystem easier to use
The facade pattern defines a consistent interface , use To shield the details of internal subsystems , bring The caller only needs to call this interface , You don't need to care about the internal details of this subsystem
1. Cinema Management Project
Set up a home theater :
DVD player 、 Projector 、 Auto screen 、 Surround sound 、 Popcorn machine , It is required to complete the function of using home theater , The process is :
Directly with the remote control : Coordinate the switch of each equipment
Open the popcorn machine
Put down the screen
Turn on the projector
Turn on the stereo
open DVD, choose dvd
Go get the popcorn
Dim the lights
Play
After watching the movie , Shut down the devices
2. Traditional way to solve theater management
Class diagram :

Code :
ClientTest{
public static 边栏推荐
- The differences between exit, exit (0), exit (1), exit ('0 '), exit ('1'), die and return in PHP
- How does laravel run composer dump autoload without emptying the classmap mapping relationship?
- 二叉搜索树(特性篇)
- 【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
- torch. Numel action
- Set the route and optimize the URL in thinkphp3.2.3
- Introduction to ThinkPHP URL routing
- [Android -- data storage] use SQLite to store data
- js中复选框checkbox如何判定为被选中
- Markdown formula editing tutorial
猜你喜欢

1亿单身男女“在线相亲”,撑起130亿IPO

Vs tool word highlight with margin

统计学习方法——感知机

You Yuxi, coming!

Xcode Revoke certificate

【Android -- 数据存储】使用 SQLite 存储数据

Odoo integrated plausible embedded code monitoring platform

Pycharm terminal enables virtual environment

Three. JS series (1): API structure diagram-1

网关Gateway的介绍与使用
随机推荐
Xcode Revoke certificate
Logback logging framework third-party jar package is available for free
统计学习方法——感知机
How does laravel run composer dump autoload without emptying the classmap mapping relationship?
Horizontal and vertical centering method and compatibility
Pycharm terminal enables virtual environment
01tire+ chain forward star +dfs+ greedy exercise one
[C language] question set of X
[hcsd celebrity live broadcast] teach the interview tips of big companies in person - brief notes
Record the migration process of a project
The team of East China Normal University proposed the systematic molecular implementation of convolutional neural network with DNA regulation circuit
Find tags in prefab in unity editing mode
What about the pointer in neural network C language
Leetcode-136-只出现一次的数(用异或来解答)
null == undefined
logback. XML configure logs of different levels and set color output
二叉搜索树(特性篇)
Shandong old age Expo, 2022 China smart elderly care exhibition, smart elderly care and aging technology exhibition
What are compiled languages and interpreted languages?
如何快速检查钢网开口面积比是否符合 IPC7525