We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
I’ve lately enjoyed revisiting the SOLID Design Principles. In the world of software architecture, few principles have stood the test of time like these. I find the “Dependency Inversion Principle” particularly interesting, as it’s one of the few that are either forgotten in modern applications, or drowned in so much over-engineering that the cost/benefit equation is offset anyways.
Note: Clean Architecture encompasses far more than individual SOLID principles - including concentric dependency circles, strict boundary rules, and comprehensive architectural patterns - but we need to start somewhere. This article kicks off a series exploring some of these principles, starting with DIP, which I’ve found to be particularly neglected on projects that I’ve contributed to lately.
The Dependency Inversion Principle states:
- High-level modules should not import anything from low-level modules. Both should depend on abstractions (e.g., interfaces).
- Abstractions should not depend on details. Details (concrete implementations) should depend on abstractions.
Today, let’s explore how Go’s plugin system enables these principles.
The complete code for this article can be found at github.com/cekrem/go-transform.
Also, kudos to Uncle Bob for reminding me about the importance of good software architecture in his classic Clean Architecture! Without it, we’ll all be building firmware (my paraphrased summary).
continue reading on cekrem.github.io
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.