45
loading...
This website collects cookies to deliver better user experience
Data Coupling: When modules shared primitive data between them.
Stamp Coupling: When modules shared composite or structural data between them and It must be a non-global data structure. for example, Passing object or structure variable in react components.
Control Coupling: When data from one module is used to direct the structure of instruction execution in another.
External Coupling: When two modules shared externally imposed data type that is external to the software like communication protocols, device interfaces.
Common Coupling: When two modules shared the same global data & dependent on them, like state management in JavaScript frameworks.
Content Coupling: When two modules shared code and can modify the data of another module, which is the worst coupling and should be avoided.
-------------------
|Add To Cart module|
-------------------
| login() |
| selectProduct() |
| getShippingDetails() |
| PrintReceipt() |
------------------------
---------------------------------
| Add To Cart module |
---------------------------------
| selectProduct() |
| getShippingDetails() |
| calculatePrice() | |
---------------------------------
Functional Cohesion: The execution of the task related to the problem is the only concern from all the elements inside the module.
Sequential Cohesion: The output of an element is the input of other element in a module i.e., data flow between the parts.
Communicational Cohesion: Multiple elements in a module operate on same input data and produce same output data.
Procedural Cohesion: The activities in module are related by sequence, otherwise they are not related.
Coincidental Cohesion: The activities with meaningless relationship with one another are contributed by the elements in the module.
Good Software has always low coupling with high cohesion