In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge points that can be applied to the web meta-sharing model under what circumstances. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
Applicability
The shared meta mode can be applied in the following cases.
When there are a large number of objects in the same or similar state in the application.
When data or objects need to be shared between different objects due to the functional requirements of the application.
structure
Participant
Flyweight (Translator)
-define the interface for sharing elements. Generally speaking, the parameters of the interface cannot be shared. Compared to sharing meta-stored data, it is called external data.
ConcreteFlyweight (ConcreTranslatorA,ConcreteTranslatorB)
-stores common or similar internal data.
-complete data composed of internal data and external data and realize the function of sharing meta-interface.
UnsharedConcreteFlyweight (-)
-there may be situations where there is no need to share data, both from the perspective of storage efficiency and from the perspective of application requirements. The interface of this class is the same as the share element, and can be used to manage the share meta-object.
FlyweightFactory (TranslatorFactory)
-build appropriate sharing elements according to the needs of users.
-decide whether to generate new shares or return shares that already exist and need to be shared according to pre-determined rules (whether to share or not, type).
Collaboration
The user acquires the sharing meta-object through FlywieghtFactory and invokes the operation of the sharing meta-object using external data as parameters to complete the function.
These are all the contents of this article entitled "under what circumstances can web enjoy the meta-mode"? thank you for your reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.