8
votes

Dependency Injection best practices - lazy initialization
Delphi sorcery
– “You gotta know when to be lazy. Done correctly, it's an art form that benefits everyone.” Nicholas Sparks, The ChoiceI admit this was taken out of context a bit - but we will see how this applies to dependency injection.Identifying the problemWhen dealing with dependency injection - and when I am saying dependency injection I am referring to the software design pattern - you are facing one problem pretty quickly. The first instance you create (or resolve using the container at the very root of your application) needs everything injected that you will ever need, either directly ...
Statistics
|
Visits by Source |
User Actions |