当前位置:网站首页>[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
边栏推荐
猜你喜欢
null == undefined
Multiplication in pytorch: mul (), multiply (), matmul (), mm (), MV (), dot ()
You Yuxi, coming!
全网“追杀”钟薛高
AutoLISP series (3): function function 3
Cesium(3):ThirdParty/zip. js
模仿企业微信会议室选择
The difference and working principle between compiler and interpreter
【DesignMode】代理模式(proxy pattern)
爬虫(17) - 面试(2) | 爬虫面试题库
随机推荐
laravel post提交数据时显示异常
水平垂直居中 方法 和兼容
torch.numel作用
laravel中将session由文件保存改为数据库保存
PHP中exit,exit(0),exit(1),exit(‘0’),exit(‘1’),die,return的区别
Pycharm terminal enables virtual environment
Laravel service provider instance tutorial - create a service provider test instance
Statistical learning method -- perceptron
PHP has its own filtering and escape functions
Tragedy caused by deleting the console statement
How to determine whether the checkbox in JS is selected
The team of East China Normal University proposed the systematic molecular implementation of convolutional neural network with DNA regulation circuit
【C 语言】 题集 of Ⅹ
The difference and working principle between compiler and interpreter
95. (cesium chapter) cesium dynamic monomer-3d building (building)
Performance comparison of tidb for PostgreSQL and yugabytedb on sysbench
删除 console 语句引发的惨案
【知识小结】PHP使用svn笔记总结
[hcsd celebrity live broadcast] teach the interview tips of big companies in person - brief notes
MySQL数据库基本操作-DQL-基本查询