網頁

2016年1月5日 星期二

訊息耦合 Message coupling

耦合力(Coupling)


衡量模組間相互關聯的強度。
愈弱愈好,若兩模組間有多種耦合關係,以較強的耦合力為準

耦合性約分有7種,前六個很好理解,但第7個就很模糊
  1. 內容耦合(content coupling,耦合度最高)
  2. 共用耦合(common coupling)
  3. 外部耦合(external coupling)
  4. 控制耦合(control coupling
  5. 特徵耦合(stamp coupling)
  6. 資料耦合(data coupling)
  7. 訊息耦合(message coupling,是無耦合之外,耦合度最低的耦合)


OTHER分類

  • 子類別耦合(subclass coupling):描述子類別和父類別之間的關係,子類別連結到父類別,但父類別沒有連結到子類別。
  • 時空耦合(temporal coupling):二個動作只因為同時間發生,就被包裝在一個模組中。
  • 常式呼叫耦合(Routine call coupling)
  • 型態使用耦合(Type use coupling)
  • 包含或輸入耦合(Inclusion or import coupling)




Message coupling 訊息耦合是什麼??

"Message coupling"網路上的解說整理
This loose coupling should ideally be implemented as message coupling, in which one module interacts with another module through a stable, public interface and does not need to be concerned with the other module's internal implementation. That would allow progress, and changes, in one module to take place without interfering with the others.  
Message coupling is defined by modules are not dependent on each other; instead they use a public interface to exchange parameter-less messages. This type is endorsed by the service oriented architecture and ensures the loosest type of coupling. 
message coupling is the loosest type of coupling. Modules are not dependent on each other, instead they use a public interface to exchange parameter-less messages (or events, see Message passing). 
message coupling is a the loosest form of coupling that can be achieved by a state of decentralization 
This is the loosest type of coupling. It can be achieved by state decentralization (as in objects) and component communication is done via parameters or message passing (see Message passing). 
when modules are not dependent on each other and pass message without data back and forth 
request of service 
a good approach is Message coupling where a subsystem offers its serveices with message exchanges through a define public interface 
code can be coupled to other code by the fact that it results in executing other code by way of an abstract interface(message coupling) 
there is no dependency between p and q .  ; p uses q’s public interface to send a (parameterless) message to q 
modules communicate through interface  //CS 121“Ordering Chaos” Design II Mike” Michael A. Erlinger 
Message coupling is characterized by the exchange of unstructured messages between modules.When the connection is established the coupled modules are almost independent of each other. Because unstructured messages cannot be interpreted by software, engineers have to evaluate them on the basis of their knowledge and experience. 
modules communicate through parameters or messaging 
Message coupling: Two modules communicate only through a public interface by sending parameterless messages or events but are not dependent on each other in any way. This is the loosest from of coupling. 
Context message coupling: it is a type of message coupling in which context-aware Web services use messagesto transfer context information. It can be built based on publish-subscribe and P2P (Peer-to-Peer) systems 
Message coupling looks like data coupling, but it's even looser because two modules communicate indirectly without ever passing each other data. Method calls have no parameters, in other words.

我的解說

各模組均為獨立互不干擾,可透過公共介面來提供服務。此介面為抽象介面,不因特定模組修改,而使介面有所變動。即若A模組使用到B模組的服務,不會因為B模組的服務修改而連帶到A模組。





參考資料

http://www.wseas.us/e-library/conferences/2010/Iasi/MCBEC/MCBEC-42.pdf
http://www.adingor.es/Documentacion/CIO/cio2007/Papers/0119_0128.pdf
http://www.taodocs.com/p-11670243.html
https://goo.gl/IvFUkG
https://goo.gl/lgQqpr
https://goo.gl/1dBrZG
https://goo.gl/PN0VOj
http://goo.gl/vFIlG2
https://quizlet.com/29383171/software-engineering-design-coupling-flash-cards/
http://borax.truman.edu/260/ClassNotes/c18coupling.pdf
http://euklid.bauing.uni-weimar.de/ikm2009/3-final-man_142.pdf
http://www.runbitrun.com/2013/10/04/coupling/
http://wiki3.cosc.canterbury.ac.nz/index.php/Coupling_and_cohesion
http://dsg.tuwien.ac.at/staff/truong/publications/books/truong-contextcoupling-cawsbook09.pdf




沒有留言:

張貼留言