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 motivation of the web intermediary model

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces the relevant knowledge of "what is the motivation of web intermediary pattern". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope this article "what is the motivation of web intermediary pattern" can help you solve the problem.

Intention

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.

motivation

One of the important principles of object-oriented design is high cohesion and low coupling. Therefore, when designing a software, you always want to decompose the functions of the system and assign them to different participant classes. This approach has no problem with the reusable part of the software function, because it contributes to the reuse of the software function. However, for the part of the software function that is only applicable to the current software, if it is not forced to be assigned to the participant class, it will cause the expansion of the number of classes and the geometric growth of the degree of dependence between classes.

Consider the text wrapping property setting dialog box in Word2016 below. After the user chooses different wrapping methods, the validity of the following text wrapping direction and distance setting controls will change.

If you want each wrap control to manage the actions of other controls, you need to have each wrap control establish a notification channel with other controls. You can imagine what a complex network this is.

Almost all application development will encounter this problem, that is, when we focus more and more common functions on reusable classes, someone will always have to bear those non-reusable parts. Those non-reusable parts are often application-specific content, which is at the center of the business, using the functions of reusable classes to coordinate the behavior of reusable classes. The class that handles this part of the function is the intermediary class.

That's all for "what are the motivations for the web intermediary model?" Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

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