The Stable-Dependencies Principle

What? The Stable-Dependencies Principle (SDP) says: ”Depend in the direction of stability.” What this means is that the direction of the dependencies in the component dependency graph should point towards more stable components. To understand what this means we need to define stability for a component. Uncle Bob turns this around and defines a way […]

The Acyclic Dependencies Principle

What? The Acyclic Dependencies Principle (ADP) is the first of three principles that deals with the relationships between components. It says: ”Allow no cycles in the component dependency graph.” If you draw the components and the dependencies between them and you are able to follow a dependency back to a component you have already visited, […]

The Common Reuse Principle

What? The Common Reuse Principle (CRP) states: ”The classes in a component are reused together. If you reuse one of the classes in a component, you reuse them all.” In the last post I wrote about the Reuse/Release Equivalence Principle (REP). It says that reusable components must be releasable components, with everything that comes with […]

The Reuse/Release Equivalence Principle

What? When we group classes into components we strive towards making some of them reusable so that we can potentially use them for other purposes and also other teams in the organization may use them if they want to. The Reuse/Release Equivalence Principle (REP) states that ”The granule of reuse is the granule of release”. […]

Principles of Package and Component Design

One of the most known set of principles regarding software design is probably SOLID. But an important part of structuring software that SOLID does not cover is how to group classes into packages and components in a way that makes it scale, both when the application itself grows but also when the number of teams […]

SOLID – The Dependency-Inversion Principle

We have now reached the grande finale of the blog series on SOLID, the big D, The Dependency-Inversion Principle. Let’s jump right into it. Definition The Dependency Inversion Principle (DIP) states: A: High-level modules should not depend on low-level modules. Both should depend on abstractions. B: Abstractions should not depend upon details. Details should depend […]

SOLID – The Interface Segregation Principle

We are closing in on the final principle of SOLID. In the last post I wrote about the Liskov Substitution Principle, and now it is time to take a look at The Interface Segregation Principle (ISP). Definition The Interface Segregation Principle was coined by Robert C. Martin. It is explained in his book ”Agile Software […]

SOLID – The Liskov Substitution Principle

In the previous post I wrote about the O in SOLID, The Open/Closed Principle. Now it is time for the L, The Liskov Substitution Principle (LSP). Definition In the year 1988, the American Computer Scientist Barbara Liskov, wrote What is wanted here is something like the following substitution property: If for each object o1 of […]