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 is the structure of web memo mode". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "what is the structure of web memo mode"!
structure
participants
· Memento
- The data formed after the state of the object is extracted is called a memo. What data needs to be saved is up to the class that generates the state data.
- Since managers do not understand the details of the memorandum, they cannot manipulate the data contained in the memorandum. This ensures the encapsulation of memo data from the result.
- There is no need to define memo classes in Python.
· Originator
- A class that extracts its own state and generates memos is called an originator. Memo data is generated upon receipt of a request to generate a memo.
- Upon receipt of a request to restore the memo, restore its own state based on the inputted memo data.
Caretaker(Head)
- Get memos from the initiator or use memos to restore the initiator status according to functional requirements.
- As a memo manager, his responsibility is limited to managing memo data and not manipulating data (except deletion).
- The information to be managed includes, in addition to the memo data itself, correspondence information (implicit or explicit) between the memo and the originator, only in this way can it be guaranteed that the memo can be sent to the correct originator object.
effect
Memo mode leaves the task of creating memos and using memos to restore their state entirely to the originator. In this way, the user can retrieve and retrieve the data stored in the memo without knowing the internal structure of the generator.
The advantage of this is that the two things of memo generation/use and management are completely separated, and the information required to use the memo data is reduced as much as possible, thus ensuring the scalability of the software. However, from another perspective, leaving the process of generating memos entirely to the originator will also have certain adverse consequences. For example, the capacity of memory space occupied by generating memos cannot be controlled. This is not a problem with the memo model, but with packaging. And in terms of practical development, this problem can be avoided with a little attention.
At this point, I believe that everyone has a deeper understanding of "what is the structure of the web memo mode", so it is advisable to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
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.