publish date
Oct 24, 2022
duration
33
min
Difficulty
Case details
1. Basic DI 2. Singletons 3. Factories: hiding construction details 4. Service Locator: putting everything together 5. Property wrappers First I'll fast forward through the basics types of dependency injection, with it's examples related to testability. After that, we talk a bit about singletons, how to make them testable and how to apply it for a simple DI approach (poor mans DI). From singletons we move to a simple example on how to factories to hide building details and achieve a bit more of decoupling and testability. With Basic DI, Singleton and Factory examples/concepts we can put everything toghether to create a Service Locator, that would decouple thing even more. As the last part, we make Service Locators a bit nicer with property wrappers while also keeping them testable and guaranteeing isolation on tests.
Share case: