How to Refactor to Configurable Dependency in 5 Steps

1 · freeCodeCamp.org · Aug. 19, 2022, 10:50 p.m.
Configurable Dependency, also known as Dependency Injection, is a pattern that enables you to switch dependencies of your application. The term [https://web.archive.org/web/20170624023207/http://alistair.cockburn.us/Configurable+Dependency] was coined by Alistair Cockburn. Say your application has a GUI. But your administrator wants to use certain functions via the console. Or your production code calls...