I just watched this short 2:39 video from Uncle Bob, and it rang a bell. His books inspired me two decades ago to create NDepend—a tool for .NET developers who prioritize code structure and quality. Consuming a framework is all about coupling and dependency.
The problem with Frameworks
- Part of the fashion that happens in our industry are various new frameworks being released. The community get excited about it
- Framework are not made for your benefits but for framework author’s benefit.
- There is a huge asymmetry between framework consumers and framework authors:
- Your code is deeply coupled with the framework .
- Framework authors don’t care if the framework get in your way at a point, forces you to work around the framework.
- Usually Frameworks make the first months of a project easy but then they make the following years of the project difficult.
- Good architects look at a framework with a cost/benefit trade-off in mind.
- Good architects put boundaries between the framework and the rest of the code.
- When using a framework you must commit to them, they do not commit to you.
Our .NET journey through Frameworks
.NET is a platform, it is also a framework. We were all once tightly coupled with the .NET Framework, but since 2017, it’s been all about .NET Core. Microsoft made it relatively easy to migrate to .NET Core. However we coupled most of our code with .NET Standard 2.0 (77%). This is essential, as our code runs on both .NET Framework (when used as a Visual Studio extension) and .NET Core (when generating web reports on macOS and Linux).
Hello
You have touched on very important points, thank you.
Being dependent on frameworks can really cause huge problems in terms of business continuity.
When Microsoft switched from .Net Framework to .Net Core, we had to move our .Net Framework based web application, which was developed for years in line with the needs of the business, to .Net Core and moving it to another platform required almost the same work, so we had to move the application to PHP.
The structure of .Net Core, which forced us to revise previously written codes that emerged in each version, was also effective in this decision.