
Design Patterns Part 1 – You Create Me!
Coding Blocks
00:00
The Pros and Cons of Using Dependency Injection
It can be used with configs, as we mentioned earlier. This usually relies pretty heavily on reflection. So your factory might create you like a mock PayPal client rather than a real one that talks to the service. It's basically how the factory itself is newed up. The whole purpose is to get away from using the new keyword.
Transcript
Play full episode