联轴器选型_联轴器| 软件工程
聯(lián)軸器選型
耦合 (Coupling)
In general terms, the term coupling is defined as a thing that joins together two objects. If we talk about software development, then the term coupling is related to the connection between two modules, i.e. how tight interaction do the two modules hold with each other is defined by coupling.
一般而言,術(shù)語(yǔ)“ 耦合”定義為將兩個(gè)對(duì)象連接在一起的事物。 如果我們談?wù)撥浖_發(fā),那么術(shù)語(yǔ)耦合與兩個(gè)模塊之間的連接有關(guān),即,通過(guò)耦合來(lái)定義兩個(gè)模塊之間保持的緊密交互程度。
Hence, the term coupling is defined as follows: "“The measure of the degree of the interdependency of two modules on each other is known as coupling."
因此,術(shù)語(yǔ)“ 耦合”定義如下: ““兩個(gè)模塊相互依賴程度的度量稱為耦合”。
It should be noted that a module that has high cohesion and low coupling is functionally independent.
應(yīng)該注意的是,具有高內(nèi)聚性和低耦合性的模塊在功能上是獨(dú)立的。
How can the coupling between two modules be defined?
如何定義兩個(gè)模塊之間的耦合?
The interconnection of interdependency between two modules is defined by the interface between them because any two modules cannot be connected if there exists no interface between them. Now, the level of coupling that exists among the two modules is defined by the number of data transfers that take place among them. If any of the modules (or both) is highly dependent on the data that the other module provides to it, then we say that the two modules are highly coupled. Else, we say that the two modules are loosely coupled or the coupling between the modules is low.
兩個(gè)模塊之間的相互依賴關(guān)系的互連由它們之間的接口定義,因?yàn)槿绻麅蓚€(gè)模塊之間不存在接口,則任何兩個(gè)模塊都無(wú)法連接。 現(xiàn)在,兩個(gè)模塊之間存在的耦合級(jí)別由它們之間發(fā)生的數(shù)據(jù)傳輸數(shù)量定義。 如果任何一個(gè)模塊(或兩個(gè)模塊)高度依賴于另一個(gè)模塊提供給它的數(shù)據(jù),那么我們說(shuō)這兩個(gè)模塊是高度耦合的。 否則,我們說(shuō)兩個(gè)模塊是松散耦合的,或者模塊之間的耦合很弱。
Now, the term coupling is further classified into different classes which help us to quantitatively determine the level of coupling between two modules. The different classes of coupling are as follows:
現(xiàn)在,術(shù)語(yǔ)耦合被進(jìn)一步分為不同的類別,這有助于我們定量確定兩個(gè)模塊之間的耦合級(jí)別。 耦合的不同類別如下:
The sequence of the given classification is from high to low in a top-to-down manner. Now, let us define each of them to understand what they mean:
給定分類的順序以從上到下的方式從高到低。 現(xiàn)在,讓我們定義每個(gè)對(duì)象,以了解它們的含義:
Content Coupling: In the content coupling, the two modules are connected as they share the same content. What this means is that the content, i.e. the code of both the modules, has some parts in common which are the functions and methods that are used by both of the modules. This type of coupling is termed to be the strongest type of coupling.
內(nèi)容耦合 :在內(nèi)容耦合中,兩個(gè)模塊由于共享相同的內(nèi)容而被連接。 這意味著內(nèi)容(即兩個(gè)模塊的代碼)具有某些共同點(diǎn),這是兩個(gè)模塊所使用的功能和方法。 這種類型的耦合被稱為最強(qiáng)的耦合類型。
Common Coupling: Two modules are said to be commonly coupled if they share the data using the same data items (i.e. the variables). These data items must be in global access to both of the modules so that both the modules can be able to access these data items.
通用耦合 :如果兩個(gè)模塊使用相同的數(shù)據(jù)項(xiàng)(即變量)共享數(shù)據(jù),則稱為通用耦合。 這些數(shù)據(jù)項(xiàng)必須對(duì)兩個(gè)模塊都具有全局訪問(wèn)權(quán)限,以便兩個(gè)模塊都能夠訪問(wèn)這些數(shù)據(jù)項(xiàng)。
Control Coupling: If the data from the module is responsible for controlling the activities happening in another module, then these modules are said to be control coupled. Here, mostly, one or two bits of signal data are passed which controls the operations happening in some other module. A well-known example of this can be the set of flags of a module by some other module.
控制耦合 :如果來(lái)自模塊的數(shù)據(jù)負(fù)責(zé)控制另一個(gè)模塊中發(fā)生的活動(dòng),則可以說(shuō)這些模塊是控制耦合的。 在這里,大多數(shù)情況下,將傳遞一或兩位信號(hào)數(shù)據(jù),以控制其他模塊中發(fā)生的操作。 眾所周知的示例可以是某個(gè)其他模塊對(duì)模塊的標(biāo)志集。
Stamp Coupling: Two modules are said to be stamp coupled if they both use a composite data item to interact with each other.
標(biāo)記耦合 :如果兩個(gè)模塊都使用復(fù)合數(shù)據(jù)項(xiàng)相互交互,則稱這兩個(gè)模塊為標(biāo)記耦合。
Data Coupling: This type of coupling is the weakest one. Two modules are said to be data coupled if they communicate through some parameters. An example can be of the parameters that are passed to a function block.
數(shù)據(jù)耦合 :這種耦合是最弱的一種。 如果兩個(gè)模塊通過(guò)某些參數(shù)進(jìn)行通信,則它們稱為數(shù)據(jù)耦合。 一個(gè)示例可以是傳遞給功能塊的參數(shù)。
翻譯自: https://www.includehelp.com/basics/coupling-software-engineering.aspx
聯(lián)軸器選型
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的联轴器选型_联轴器| 软件工程的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: “玄经不期赏”上一句是什么
- 下一篇: mcq 队列_MCQ | 软件生命周期模