Decouple Your Code With Dependency Injection
What is this article about?
Not many components live on their own, without any dependencies on others. Instead of creating tightly coupled components, we can improve the separation of concerns by utilizing dependency injection (DI).
This article will introduce you to the core concept of dependency injection, without the need for third-party frameworks. All code examples will be in Java, but the general principles apply to any other language, too.