In computer science, coupling or dependency is the degree to which each program module relies couplin on each other module.
Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa. The software quality copuling metrics of coupling and cohesion coupling were invented by Larry Constantine, original developer of Structured Design (see also manual couplings SSADM).
- 1 Low coupling
- 2 Types of coupling
- 3 Example
- 4 Known military trailer couplings uses
- 5 See also
Coupling can be "low" (also couplings "loose" and "weak") or "high" (also "tight" and "strong"). Low coupling means that one module does not have to be concerned with the internal implementation of falk coupling another module, and interacts with another module with lovejoy coupling a stable interface (see Information shaft couplings hiding). With low coupling, a change in one module will not require a change in the implementation of another module. Low coupling is a sign of dresser coupling a well structured computer system.
However, in shaft coupling order to achieve maximum efficiency, a highly coupled system is sometimes rotex coupling needed. In modern computing systems, performance is often traded for lower coupling; the gains in the software development kitchenaid blender drive coupling process are greater than automatic trailer couplings the value of the running performance gain.
Low-coupling / high-cohesion is a general goal to achieve when structuring computer programs, so that they are magnaloy coupling easier to understand and maintain.
The concepts are usually related: low coupling implies high cohesion and vice versa. manual trailer couplings In the field of object-oriented programming, the connection pipe coupling between classes tends to get lower (low coupling), if we group related methods muff coupling of a class together (high cohesion).
In object-oriented programming, coupling is a measure of how bbc coupling strongly one class is connected to another.
Coupling is increased between two classes A and energy coupling B if:
- A has an attribute that refers to (is of type) B.
- A calls rigid shaft couplings on services of a B object.
- A has a p110 couplings method which references B (via return type or parameter).
- A is a agma unbalance load coupling subclass of (or implements) B.
Disadvantages of high coupling include:
- A change in one class forces a ripple of changes in bsp nst couplings other classes.
- Difficult to understand a class in isolation.
- Difficult to reuse or test a class because dependent falk couplings class must also be included.
One measure to achieve low coupling is functional design: it 138-140 shaft coupling limits the responsibilities of modules. Modules with single responsibilities usually need to communicate less flanged rigid coupling with other modules, and this has the virtuous side-effect of reducing magnet couplings coupling and increasing cohesion in many cases.
Types of coupling
The types of coupling, in pipe couplings order of lowest to highest coupling, are as follows:
- Data coupling
- Data coupling fluid coupling is when modules share data through, for example, parameters. Each datum is an elementary morris coupling piece, and these are the only data which are shared (e.g. passing an integer fernco coupling to a function which computes fernco couplings a square root).
- Stamp coupling (Data-structured coupling)
- Stamp coupling is when modules share a composite flexible coupling data structure, each module not knowing which part flexible shaft couplings of the data structure will be used by the other (e.g. passing a student record to a function which rigid shaft coupling calculates the student's GPA).
- Control coupling
- Control coupling is one module controlling the bowex coupling logic of another, by passing it information on what to do (e.g. passing a what-to-do flag).
- External coupling
- External coupling coupling coefficient air transformer occurs when two modules share an externally imposed data format, calculations and couplings and stress communication protocol, or device interface.
- Common coupling
- Common coupling is when two modules cam and groove coupling gaskets share the same global data (e.g. a global variable).
- Content coupling
- Content coupling is when one module modifies or relies on the internal workings coupling adaptors of another module (e.g. accessing local data of another module).
In object-oriented coupling terracotta and plastic pipe programming, subclass coupling describes coupling theme a special type of coupling between a parent class and its dodge couplings child. The parent has no connection to the child class, so the connection is one way (i.e. the parent is a sensible class on pt coupling its own). The coupling is hard to classify as low thomas coupling or high; it can depend on the situation.
In the first instances of the IBM PC BIOS, toothed couplings some developers used low level unibolt coupling but undocumented internal functions to optimize their programs, instead woods coupling of the public API. This approach had the advantage of bringing higher performance, but as a result the programs aise mill motor coupling were more complex, more difficult to maintain, and the internal functions could change on a subsequent BIOS version.
Dependency is also common in talking about software package shaft designs and rigid coupling management. One software package, in order to work or to be fully functional, may depend allegheny coupling on other anchor coupling software packages and thus must also be installed, and their specific versions must be known if backward coupling season 5 compatibility is broken between versions. The Advanced Packaging Tool package format, as well as some versions of the design calculations for couplings and shafts RPM package format, include dependency information between packages. This is convenient for updating software but can dresser coupling nut lead to dependency hell.
Build systems excitation-contraction coupling + isotonic latency like make are also dependency driven in the sense that a more complex object, like falk t20 steelflex coupling a program, only gets linked together once all its dependencies, i.e. the objects it is comprised of, have been muff couplings rotating slip coupling compiled.
High cohesion and low coupling are attributes of good design.
- Inversion of Control
- Loose coupling
actuator couplings eaton hose couplings grove gearbox and coupling
Categories: Articles with unsourced statements | valve couplings Object-oriented programming | Software 18mm poly insert couplings architecture