In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what parts of web command mode are composed of". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian and go deep into it slowly to study and learn "what parts of web command mode are composed of" together!
structure
participants
· Command
- Declares the Execute interface that performs the operation. There are other options available in actual development, such as do/undo.
· ConcreteCommand ( PasteCommand,OpenCommand )
- The representational Command class generally manages a receiver instance as the object of an operation.
- Implement the Execute operation.
· Client ( Appliction )
- Create a concrete command object and set its recipient. In instance development, the Client instance that creates the Command instance and the Client instance that sets the receiver are not necessarily the same.
· Invoker ( MenuItem )
- Asks the command object to execute the request.
· Receiver ( Document,Application )
- Object of the Execute operation. The receiver can be an instance of any class. Different Commands can have different receivers, and different Command classes can handle different types and numbers of receivers.
collaboration
Client creates a ConcreteCommand object and specifies its Receiver object.
An Invoker object receives the ConcreteCommand object.
Invoker invokes the execution operation of the ConcreteCommand object.
·The ConcreteCommand object invokes some of Receiver's operations to execute the request.
effect
1)Command mode can separate the decision of action content from the execution of action, so that the two can be carried out in different time and space.
2)By extending a derived class of the Command class, you can modify the behavior of an Invoker without affecting it.
3)Simple commands can be combined into a compound command.
4)Adding the new Command also places a small burden on clients.
In short, Command mode enables the three actions of selecting the content of the process, deciding the object of the process, and executing the process to be performed separately.
Thank you for reading, the above is the content of "what parts of the web command mode are composed of", after learning this article, I believe that everyone has a deeper understanding of what parts of the web command mode are composed of, and the specific use needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.