Академический Документы
Профессиональный Документы
Культура Документы
COUPLING
Is the degree of interdependence between two modules
TYPES
TIGHT COUPLING LOOSE COUPLING
TIGHT COUPLING: Interdependencies are strong when one module modifies or relies on the internal workings of another module. Therefore changing one module , will lead to changing the dependent module
LOOSE COUPLING
The minimum required set of dependencies existing between any two systems Means one module changes are unlikely to effect other modules Low coupling can be achieved when components communicate through parameters or message passing
COHESION
Coupling is contrasted with cohesion A measure of how well a component fits together
WHY?
Too many dependencies can make it harder to change anything because a large number of related changes needs to be made . These changes take time. A particular module might be harder to reuse and/or test because dependent modules must be included. Thats why reducing dependencies to the minimum possible makes such good sense