Search code examples
javaooplanguage-agnostictheorycohesion

Communication cohesion


There are coupling and cohesion for modules. OK. There are functional and communication cohesion. Functional cohesion is grouping by functionality. OK. Communication cohesion is grouping by input/output data.. Hm.. Not OK. Can any explain me what is communication cohesion or/and provide example (any language, but Java is preferable)?


Solution

  • This is just my interpretation, but I'd say that "communication cohesion" means that code that works with the same data is placed together, and together with that data. "Together" can mean that it's in the same package or JAR, which means the advantage is mainly in maintainability. Or it can mean that it lives on the same hardware or the same LAN, which has performance and security benefits.