3 ms·
I am of the school of thought that making relationships explicit leads to better coding practices and use DI via constructor to do so. I think the really impor
by Glide 13y ago
I am of the school of thought that making relationships explicit leads to better coding practices and use DI via constructor to do so.
I think the really important factor though is how mature the ecosystem is in supporting DI. The richness of C# and Java DI container implementations make using service locator patterns dubious. Well and how many ice cold stares you would get by using service locators. I'm trying my hand at iOS development after years of C# and the ecosystem is radically different.
On the other hand mocking libraries are a dream in a message passing runtime like Objective-C.