我相对不熟练的依赖注入,我想学习一些最佳实践和反模式使用和避免分别使用DI。
我真的很喜欢这篇文章关于DI,因为它针对的人谁没有一个DI的经验,或甚至不知道它是什么。
https://mtaulty.com/2009/08/10/m_11554/
What’s Unity?
06000
Now,at that point a bunch of folks
reading this will say “Yes,we know
and we’re already using it for reasons
A,B,C or we’ve elected not to use it
for reasons X,Y,Z ” and I imagine a
bunch of other folks might say;06001
This post is for the latter people – it’s not meant to be exhaustive but hopefully it’s not completely unhelpful either