Object Oriented Software Engineering   View all facts   Glossary   Help
subject > criterion > quality > software quality > cohesion > layer cohesion
Next cohesionprocedural cohesion    Upcohesion    Previous cohesionfunctional cohesion   

layer cohesion
subjectfact 
layer cohesionallows side-effects2001-08-30 14:56:27.0
has definition 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 layers2001-08-30 14:56:27.0
has example 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
    2001-08-30 14:56:27.0
    is a subtopic of 9.2 - Principles Leading to Good Design2001-08-30 14:56:27.0
    is a kind of cohesion2001-08-30 14:56:27.0
    requires 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 layers2001-08-30 14:56:27.0
    simplifies systems2001-08-30 14:56:27.0
    cohesionhas precedence table
    Cohesion typeComments
    functional cohesionIf an aspect of a design can be achieved using a functionally cohesive module then it is normally best to do so.
    layer cohesionLayer cohesion should typically have higher priority. Dividing systems into layers has been shown to considerably simplify systems.
    communicational cohesionCommunicational cohesion, as embodied in the classes of an object oriented system, should have high priority. Here we list it below layer cohesion since modules may access the same kind of data in different layers.
    sequential cohesionSequential cohesion is effectively a strong form of temporal cohesion, but is weaker than communicational cohesion since different data types may be involved in the different stages of a sequentially cohesive module.
    temporal cohesionTemporal cohesion should typically be considered weaker than other types of cohesion. It is important, but only if the other types of cohesion have been achieved.
    utility cohesionUtility cohesion is 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.
    2001-08-30 14:54:55.0
    software qualityis hard to assess2001-08-30 14:57:42.0