|
Written by Administrator
|
|
Friday, 10 July 2009 13:53 |
|
Page 7 of 12 Cohesion and CouplingA cohesive module does just one function, and it does it with little or no interaction from other modules. Cohesiveness decreases complexity, as less interactions lead to low complexity and simple track down of problems. The best programming uses the most cohesive modules possible, but because different modules need to pass data and communicate, they usually cannot be totally cohesive. Coupling is a measure of interconnection among modules in an application. The level of coupling involved between modules depends on the interface’s complexity, the data being passed between modules, and the point of entry or reference made to the module itself. The lower the coupling, the better the software design, because it promotes module independence. The more independent a component is, the less complex the application is, and the easier it is to modify and troubleshoot. High cohesion and low coupling is desired.
|
|
Last Updated on Friday, 28 August 2009 05:04 |