Subject |
use |
allow |
have example |
require |
help by |
has definition |
have advantages |
be |
seek only |
achieve when |
simplify |
communicational cohesion | | | | | the object oriented paradigm | A form of cohesion in which procedures that access the same data are kept together | | more important than sequential cohesion | | | |
functional cohesion | if possible | | | | | A form of cohesion in which modules which together perform a function (a computation that returns a result and has no side effects) are kept together, and everything else is kept out | - It is easier to understand a module when you know all it does is generate one specific output and has no side effects
- It is easier to replace a functionally cohesive module with another that performs the same computation
- functionally cohesive module is much more likely to be reusable
| hard to assess | | a module only performs a single computation, and returns a result, without having side-effects | |
layer cohesion | | side-effects | The set of related services which could form a layer might include:- Services for computation
- Services for transmission of messages or data
- Services for storage of data
- Services for managing security
- Services for interacting with users
- Services provided by an operating system
- Services provided directly by the hardware
| that the layers must form a hierarchy - higher layers can access services of lower layers, but it is essential that the lower layers do not access higher layers | | A form of cohesion in which the facilities for providing or accessing a set of services through an API or hardware interface are kept together. There must also be a strict hierarchy in which higher level layers can access only lower-level layers. In other words, the system is effectively divided into layers | | hard to assess | | | systems |
procedural cohesion | | | | | | A form of cohesion in which procedures that are called one after another are kept together | | weaker than sequential cohesion | | you keep together several procedures that are used one after another, even though one does not necessarily provide input to the next | |
sequential cohesion | | | | | | A form of cohesion in which a series of procedures, where one provides input to the next, are kept together | | stronger than procedural cohesion | | a series of procedures, in which one procedure provides input to the next, are kept together - and everything else is kept out | |
temporal cohesion | | | a designer would achieve temporal cohesion by placing together all the code used during system start-up or initialization | | | A form of cohesion in which aspects of a system are grouped together which are used during the same phase of execution of a program, i.e. execute close together in time | | weaker than procedural cohesion | if the other types of cohesion have been achieved | operations that are performed during the same phase of the execution of the program are kept together, and everything else is kept out | |
utility cohesion | | | | | | A form of cohesion in which utilities which cannot be logically placed in other cohesive units are kept together | | the weakest kind of cohesion since it serves to group together those parts of the system that do not seem to logically belong anywhere else | | | |