Category: SOLID
Discussion of SOLID principles and how they relate to programming and code architecture.
5x Lessons Learned from Migrating a Large Legacy to .NET 5/6
In January 2020 I wrote the post Not planning now to migrate your .NET 4.8 legacy, is certainly a mistake. Hopefully we followed our own advice and have been migrated...
Code Testability: A Case Study
[crayon-650f1f1b004c8704812736/] This method is untestable because its logic depends on NdpOperatingSystem.Kind which returns an OSPlatform object. Notice the usage of the attribute UncoverableByTest that lets code reviewers and tools like...
Top 10 .NET 5.0 new APIs
When a new major .NET version hits Release Candidate, it is time to use the NDepend code review changes capabilities to browse which new APIs have been added. It is...
Business Complexity vs. Implementation Complexity
It is good software design practice to make sure that methods can be entirely viewed in the code editor that typically shows 30 to 45 lines at a time. The...
Static Analysis and Dependency Injection
For quite some years now, we (the NDepend team) got some demand about resolving Dependency Injection, see this page on our User Voices. Lately we’ve been considering such support carefully...
SOLID Design: The Dependency Inversion Principle (DIP)
After having covered the Open-Close Principle (OCP), the Liskov Substitution Principle (LSP), the Single Responsibility Principle (SRP) and the Interface Segregation Principle (ISP) let’s talk about the Dependency Inversion Principle (DIP)...
SOLID Design: The Interface Segregation Principle (ISP)
After having covered The Open-Close Principle (OCP), The Liskov Substitution Principle (LSP) and the Single Responsibility Principle (SRP) let’s talk about the Interface Segregation Principle (ISP) which is the I...
Are SOLID principles Cargo Cult?
My last post about SOLID Design: The Single Responsibility Principle (SRP) generated some discussion on reddit. The discussion originated from a remark considering SOLID principles as a Cargo Cult. Taking...
SOLID Design: The Single Responsibility Principle (SRP)
After having covered The Open-Close Principle (OCP) and The Liskov Substitution Principle (LSP) let’s talk about the Single Responsibility Principle (SRP) which is the S in the SOLID acronym. The...
SOLID Design: The Open-Close Principle (OCP)
The Open-Close principle (OCP) is the O in the well known SOLID acronym. Bertrand Meyer is generally credited for having originated the term open/closed principle, which appeared in his 1988...
SOLID design: The Liskov Substitution Principle (LSP)
The Liskov substitution principle is the L in the well known SOLID acronym. The original principle definition is: Methods that use references to base classes must be able to use...