Is loose coupling better than tight coupling?
It's a question that has come up a few times recently with my current client and it's a topic I think is well worth exploring a little deeper. It's a really powerful concept and is, in my opinion, one of the core building block concepts of digital age solution design - and I'm not just talking about software here though that is obviously a fundamental component of any digital age solution.
So, to kick things off let's have a look at the key concepts.
What is Coupling?
For those of you that haven't come across the term before (in a systems sense!), it is one that is often used in the software development domain in the following context:
In software engineering, coupling is the degree of interdependence between software modules; a measure of how closely connected two routines or modules are; the strength of the relationships between modules. - https://en.wikipedia.org/wiki/Coupling_(computer_programming)
Roughly speaking a system can range from very loosely to very tightly coupled. I'm sure there is some rigorous software engineering method for measuring a systems coupling level but we're not going to get into that here. Let's just stick with the core concepts.
Is there a link with the concepts of Integrated vs. Modular Design?
Before I get into the pros and cons of each coupling design pattern let me also throw in what I believe is a related design pattern that is often used in other domains such as business model analysis - this the concept of Integrated vs. Modular design. This is a concept that I have read about most recently at the site of one of my favourite tech writers, Ben Thompson over at Stratechery.com. Ben often uses this concept when comparing the business models and products of some of the biggest companies in the world. His go-to example of the ultimate "Integrated" platform product company is Apple and the iPhone which is the ultimate black box with interfaces. On the other extreme he sometimes places Microsoft, which has a much more "modular" platform. For example, in the PC design many of the core building block components - hardware and peripherals in particular, were their own black box components using standard interfaces, all of which could be glued together and leveraged by the Microsoft owned Windows platform. Very much a modular design.
So how is this linked with the concepts of tight and loose coupling?
Let's see how this might play out ...
Loose Coupling/Modular Design vs. Tight Coupling/Integrated Design
Interestingly Wikipedia has an entry for Loose Coupling but none for Tight Coupling possibly reflecting that fact that, at the beginning, there was only Tight Coupling and that Loose Coupling has evolved from that. Here's what they say about loose coupling:
In computing and systems design a loosely coupled system is one in which each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. Subareas include the coupling of classes, interfaces, data, and services. -
For me it's what I like to also describe as the "black box with interfaces" architectural design pattern. Tight Coupling on the other hand is defined as everything that loose coupling isn't - more inter-dependency, more co-ordination, more information flow. I really like this graphical representation of the 2 structures and their key characteristics:
When it comes to Integrated and Modular design we see the same story in Wikipedia. Integrated Design gets relatively light coverage compared to Modular Design.
Integrated design is an approach to design which brings together specialisms usually considered separately.
Modular design, or "modularity in design", is a design approach that subdivides a system into smaller parts called modules or skids, that can be independently created and then used in different systems. A modular system can be characterized by functional partitioning into discrete scalable, reusable modules; rigorous use of well-defined modular interfaces; and making use of industry standards for interfaces.
Tightly Coupled / Integrated Designs - Pros & Cons
Here's my own take on the pros and cons on designs that are aligned to the integrated/tightly coupled design pattern.
Pros (yes there are some!):
Loosely Coupled / Modular Designs - Pros and Cons
Unlike tightly coupled systems the benefits of the loosely coupled / modular design pattern have been widely documented. Below is my take on some of the key pros and cons I see in relation to this design pattern.
Suggested guidelines on when to use these different design patterns
This is where looking at the lessons learned from different domains may provide some useful guidelines that you can use on your next design assignment.
Till next time.
About the Author
This article was originally published on the Digital Age Architects blog.
Paddy Baxter is a Senior Lecturer on the Iasa Core Certifiaction (CITA-F) course, an Iasa Ireland committee member and regular organiser of several Iasa Ireland Conferences and events.
Paddy, a big picture thinker, with IT architecture in his blood is passionate about the role of the IT Architect in modern society. Paddy has over 25 years’ experience in the IT sector working to improve organisations, processes and systems using digital technology. Working in many geographies and in many enterprises for companies such as EY, Intel, Microsoft and HP, Paddy has gained extensive experience in what value means (and does not mean), when talking digital innovation.