Playback speed
×
Share post
Share post at current time
0:00
/
0:00
Transcript

[Video] Case Study: Loosely Coupled Architecture

Realise the benefits of loosely coupled architecture through a real-world example

👋 Hi, this is Dishit with this week’s newsletter. I write about software engineering, clean code and developer productivity.

Today, I will do something special.

If you subscribe to this newsletter, you will get a FREE code review session.


If you've been in software development, you've likely come across the concept of loosely coupled design.

You may understand what it is, but have you seen how it's implemented in practice?

In this post, I'm going to show you a real-world example of how loosely coupled architecture can make a significant impact in a production environment.

The Urgent Issue

The other day at work, I was tasked with fixing an urgent issue due to a change in a vendor system that we integrate with.

Typically, this kind of scenario would require running an entire suite of regression tests and involving quality engineers or software testers.

However, because of our loosely coupled architecture, the change was minimal and only required a small unit testing, avoiding the need for extensive regression testing.

The Architecture

Our architecture consists of a vendor application with an internal database exposed via a public API, which is accessed through an integration API by the front end.

When the vendor system made a change, we only needed to update the mapping in the integration API without altering the contract between the front end and the integration API.

This meant that the front end did not require extensive regression testing, showcasing the benefits of a loosely coupled architecture.

The Alternative

I also want to illustrate the alternative scenario where the front end directly accesses details from the public API.

In this tightly coupled system, any change in the public API would require the front end to change, leading to the need for extensive regression testing and the front end taking on additional responsibilities such as authentication, error handling, and retries.

Benefits of Loosely Coupled Architecture

The contrast between the two scenarios highlights the benefits of a loosely coupled architecture:

Isolation of changes

A change in one system does not affect the entire system

Reduced blast radius

Changes are contained within specific components, minimizing the impact on the overall system

Abstraction of complexities

Authentication, error handling, and retries are handled in the integration layer, abstracted away from the front end

In conclusion, a loosely coupled architecture provides numerous advantages in software development, ensuring that changes are isolated and do not disrupt the entire system.

Thank you for reading! If you found this information valuable, please like and share to help others benefit from it as well


Before you go!

If you know someone who is looking to have their code reviewed for technical debts, code smell - look no further.

Help is here.

Just subscribe to this newsletter or reply to this email with word “REVIEW” and I will review your code.

Discussion about this podcast