9 Forms of Coupling in Software Architecture

Overview of different component coupling types

Ali Zeynalli

--

Photo by Gitte Thijssen on Unsplash

There is no software system that is free from dependencies and takes no effect if dependent components change. Software architects always have to deal with degree of dependencies between connected components and try to minimise even eliminate this effect. The software component A depends on the software component B, if A requires B for:

  • Compiling in run-time
  • being installed
  • being tested
  • running of functioning properly

Coupling is a degree of dependence between arbitrary building components.

On different abstraction levels there are different types of coupling. Coupling happens not only in source code level but also in infrastructure and many more. Software Architects need to know these types in order to make correct decisions when designing these components. We are going to take a look at some coupling types based on ISAQB Software Architecture Certification Curriculum.

Coupling via use/delegation…

This type of coupling is one of the classics. Basically, if Class A calls public variable of Class B, they are coupled via use/delegation. Best way out is to make these public variables private, and call them through getters.

Coupling via composition…

In composition relations, as you may know from Object Oriented Programming , Class A contains Class B. in some cases, Class B can is internal part of Class A and does not exist independently. Therefore these classes are coupled via composition.

Coupling via creation…

These type of coupling appears in creational design patterns such as Factory, Abstract Factory. In those design patterns, creation of f.e. Class A or B is delegated to Factory Class. In this terms, Class A or B is coupled to Factory Class via creation. Check out my other article about Design Patterns for deep dive.

5 Software Design Patterns implemented in Spring

Coupling via inheritance…

A dependency where child class should inherit properties and methods from super classes. The coupling…

--

--

Ali Zeynalli

IT-Architect | BMW Group | M.Sc. Technical University of Berlin