Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the structure of the web intermediary pattern

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail "what is the structure of the web intermediary model". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how the structure of the web intermediary model is" can help you solve your doubts.

structure

The idea of the intermediary pattern is that when multiple objects need to cooperate with each other for the same purpose, specify a mediation object as the hub of the business to reduce the degree of coupling between the objects, which is structured as follows:

Participant

Mediator (Abstract Mediator Class)

The mediator class Mediator can define interfaces for communicating with Colleague objects. It is possible because it is not easy to define a notification interface that is also applicable in the future. It is either not scalable or too vague, and the benefits are not significant.

ConcreteMediator (representational intermediary class)

-the concrete intermediary class understands and maintains each colleague object. The responsibility of the intermediary class is to absorb the parts of the software that are not common to each other, so this strong coupling is not a disadvantage.

-A concrete intermediary knows the details of a class of colleague objects, so it is also the best person to coordinate each colleague object to achieve collaborative behavior.

-it is unclear whether the intermediary is a member of a colleague. The author's view of the intermediary is that it seems to be smoother as a manager.

Colleague (colleague class)

-the colleague class (only) knows the intermediary object.

Due to the existence of the intermediary class, the colleague class does not need to understand the business logic of the software, but communicates with the intermediary according to its own functional requirements.

Collaboration

Requests and information are exchanged between the colleague object and the intermediary object, while the intermediary processes or forwards the information according to the needs of the business.

After reading this, the article "what is the structure of the web intermediary model" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it. If you want to know more about the article, please follow 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report