Communicational cohesion is one of the levels of cohesion in software engineering that describes how closely related the tasks or operations within a module or component are based on their interaction and data sharing. In modules with communicational cohesion, tasks are grouped together because they share common data or need to communicate with each other to perform their functions. This cohesion level is generally considered lower than functional cohesion, where tasks are related by a common function or purpose. Here are key characteristics and considerations related to communicational cohesion:
Data Sharing: Communicational cohesion is characterized by tasks within a module that share data or information. These tasks often rely on the same set of variables or data structures.
Interdependence: Tasks within a module with communicational cohesion are interdependent, meaning that changes to one task's data or output may affect the behavior of other tasks.
Common Data Context: All tasks within the module operate within the context of a common set of data or a shared data context. This context may include variables, data structures, or objects.
Limited Independence: Tasks in modules with communicational cohesion are less independent of each other compared to functionally cohesive modules. Changing the data context or data-sharing mechanisms may impact multiple tasks.
Reduced Reusability: Modules with communicational cohesion are often less reusable because they are tightly coupled to the specific data-sharing requirements of the module. Reusing such a module in a different context may be challenging.
Maintenance Challenges: Communicational cohesion can make modules more challenging to maintain, especially when changes to data structures or data-sharing mechanisms are needed. Modifications may have cascading effects on other tasks.
Examples: Examples of modules with communicational cohesion might include a module that processes customer information and interacts with a shared customer database, or a module that calculates various financial metrics using a common set of financial data.
Situational Applicability: Communicational cohesion may be suitable in situations where tasks within a module need to work closely together to manipulate and share specific data elements or resources. For example, in database management or data transformation modules.
Balancing Cohesion and Coupling: When designing software, it's important to balance cohesion and coupling. While communicational cohesion may be appropriate for certain tasks, it's generally desirable to aim for higher levels of cohesion, such as functional cohesion, within modules to promote modularity and maintainability.
In summary, communicational cohesion is a level of cohesion in software engineering that describes modules where tasks are closely related by their interaction and data sharing. While it can be appropriate in situations where tasks need to collaborate closely with a shared data context, careful consideration should be given to potential maintenance and reusability challenges associated with such modules.