Loose Coupling Is A Lie
Uri Chandler

The core of loose coupling is not just making components interchangeable using dependency injection or an event bus. Loose coupling is about reducing the entanglement between components, reducing the API surface between them, making components more self contained (encapsulated), and making them easier to replace.

The examples you give change the code such that you components are replaceable (using dependency injection or an event emitter), which is just one element in making code loosely-coupled. The examples don’t actually reduce the coupling between the components though: the API surface and dependency between them is still the same. With just a single API method the examples are too limited to demonstrate that of course :).

I have to disagree with your conclusion. A “good design” will definitely come up with components having high cohesion and low coupling, that’s always “the right thing to do” architecture-wise.

Like what you read? Give Jos de Jong a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.