In computer science, loose coupling denotes a low degree of dependence on hardware or software components on each other. When a system is loosely coupled, it is often easier to make changes to individual components because the change has only a local effect. If there were a close coupling, the change would not remain local but would require additional adjustments in all coupled components if necessary. In some cases, this advantage is offset by the disadvantage of slightly lower performance.
Multiprocessor systems are differentiated in loosely coupled systems and therefore tightly coupled. A loosely coupled system is used when data is transferred between two systems via I/O systems (network, data line).
The use of loosely coupled systems is geared towards the processing of distributed problems. An example of such a problem is the factorization of a very large number distributed across multiple computers. Each computer would be assigned its own set of divisors to this number, try them out and finally send the result back to the main computer.
The concept of coupling has also become established in software architecture, describing how closely the components of a software are connected. Closely associated with the term coupling is in the software architecture the term cohesion. The aim for a software system is to have as loose a coupling as possible between the components, as well as a strong bond (cohesion) within each component.
In the software architecture, the loose coupling means that components of software communicate with other components only through a few interfaces or are dependent on other components. These components do not necessarily communicate across system boundaries, but usually within a software system. In this case, the Facade design pattern describes how this can be implemented in software design. Global variables, public attributes, singletons, or, for example, the storage of software states in a database automatically enlarge the interface of components and should therefore be avoided.
Loose coupling causes changes in one component to require changes in another component only if the changes affect the interface. Loose coupling, therefore, has a direct influence on the maintainability of software. Loose coupling of interfaces can be enhanced by publishing data in a standard format (such as XML or JSON).Tagged With coupling within system architecture , loosely coupled system