Factorio is a game where you are a teeny tiny engineer has been stranded on a very large and hostile alien world. Your goal is to build a rocket and shoot yourself out of there, but that’s going to take some serious work![Read more…]
In some environments, using dependency injection (DI) and inversion of control (IoC) are not only a nice-to-have, but an expected requirement. And while DI and IoC can provide a nice abstraction away from your concrete classes, there are times, when working in a brownfield application for example, that you might find yourself in the position of simply not having the luxury of time to wire in one of these frameworks. However, that does not mean that we can not strive to accomplish what these frameworks aim to provide for us: loose coupling.
So with that in mind, I want to share a method of loosely coupled classes by way of reflection. And in the spirit of three letter acronyms (TLA), I call this pattern reflection of control (RoC).