Connascent software components

Connascent software components

Two software components are connascent if a change in one would require the other to be modified in order to maintain the overall correctness of the system. Connascence is a way to characterize and reason about certain types of complexity in software systems.

Contents

Strength

A form of connascence is considered to be stronger if it is more likely to require compensating changes in connascent elements. The stronger the form of connascence, the more difficult, and costly, it is to change the elements in the relationship.

Degree

The acceptability of connascence is related to the degree of its occurrence. Connascence might be acceptable in limited degree but unacceptable in large degree. For example, a function or method that takes two arguments is generally considered acceptable. However it is usually unacceptable for functions or methods to take ten arguments. Elements with a high degree of connascence incur greater difficulty, and cost, of change than elements that have a lower degree.

Locality

Locality matters when analyzing connascence. Stronger forms of connascence are acceptable if the elements involved are closely related. For example, many languages use positional arguments when calling functions or methods. This connascence of position is acceptable due the closeness of caller and callee. Passing arguments to a [web service] positionally is unacceptable due to the relative unrelatedness of the parties. The same strength and degree of connascence will have a higher difficulty, and cost, of change the less closely related the involved elements are.

Types of connascence

This is a list of some types of connascence ordered approximately from weak to strong forms

Connascence of Name
Connascence of name is when multiple components must agree on the name of an entity.
Connascence of Type
Connascence of type is when multiple components must agree on the type of an entity.
Connascence of Meaning
Connascence of meaning is when multiple components must agree on the meaning particular values.
Connascence of Position
Connascence of positions is when multiple components must agree on the order of values.
Connascence of Algorithm
Connascence of algorithm is when multiple components must agree on a particular algorithm.
Connascence of Execution (order)
Connascence of execution is when the order of execution of multiple components is important.
Connascence of Timing
Connascence of timing is when the timing of the execution of multiple components is important.
Connascence of Identity
Connascence of identity is when multiple components must reference the entity.

Reducing connascence

Reducing connascence will reduce the cost of change for a software system. One way of reducing connascence is by transforming strong forms of connascence into weaker forms. For example, a method that takes several arguments could be changed to use named parameters. This would change the connascence from position to name. Reducing the degree and increasing locality of involved elements are other ways to reduce connascence.

See also

Coupling

References

http://en.wikipedia.org/wiki/Class_(computer_science)


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”