Cohesion and Coupling in Software with Examples
Let's explore the concepts of cohesion and coupling in depth: where they come from, why they are so important, how to concretely apply them, when, and in what context.
Let's explore the concepts of cohesion and coupling in depth: where they come from, why they are so important, how to concretely apply them, when, and in what context.
The Open-Closed Principle was born when inheritance was seen as the solution for too many problems. Robert Martin reinterpretation of it doesn't really make sense: we shouldn't create abstractions each time we want to modify our code.
We speak about it, we complain about it, we want to get rid of it. But do we really understand what's a legacy system?
Why inheritance is considered as a pillar of OOP when so many developers criticize it? We'll see where inheritance comes from and what problems it solves.
Why nobody seems to agree when to apply the Single Responsibility Principle? Why is it often misunderstood? Let's see what are the first principles of the SRP.