What is cohesion? About indicators for software modularization

Explanation of IT Terms

What is Cohesion in Software Development?

Cohesion is a fundamental principle in software development that refers to the degree of interdependence among the elements within a module or a software system. It measures the strength of the relationship between the components of a module and the clarity of their responsibilities. Higher cohesion results in more concise, maintainable, and efficient code.

Indicators for Software Modularization

When it comes to modularizing software, there are several indicators that help determine the level of cohesion within a module. By assessing these indicators, developers can identify if the module is well-structured and follows the principles of good software design. Let’s explore some important indicators:

1. Functional Cohesion: This is the most desirable type of cohesion, where the elements within a module are grouped based on their related functionality. A highly functionally cohesive module focuses on accomplishing a single, well-defined task, making it easy to understand and maintain.

2. Sequential Cohesion: Sequential cohesion occurs when the elements of a module are arranged in a specific order, with the output of one element serving as the input for the next. Although this type of cohesion is not as strong as functional cohesion, it can still be acceptable in certain cases.

3. Communicational Cohesion: Communicational cohesion exists when the elements within a module are interdependent due to the usage of the same input or output data. This type of cohesion can be observed when several routines within a module share and manipulate common data.

4. Procedural Cohesion: Procedural cohesion is characterized by the grouping of elements that are related by common procedures or algorithms. However, this type of cohesion is considered weaker than functional or communicational cohesion as it may lack a clear focus on single functionality.

5. Temporal Cohesion: Temporal cohesion refers to the grouping of elements that need to be executed at the same point in time. These elements may not have any logical relationship but have to be executed together due to timing constraints.

6. Logical Cohesion: Logical cohesion is observed when the elements within a module are related conceptually or semantically, even though they may not share common data or procedures. This can be a weak form of cohesion if the logical relationship between the elements is not strong.

By assessing these indicators, developers can identify the cohesion level of a module and make informed decisions to improve the overall design and maintainability of the software system. Stronger cohesion fosters modular, reusable, and understandable code, resulting in higher-quality software products.

Reference Articles

Reference Articles

Read also

[Google Chrome] The definitive solution for right-click translations that no longer come up.