Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOC #2

Open
nuaacyy opened this issue Jan 13, 2019 · 1 comment
Open

IOC #2

nuaacyy opened this issue Jan 13, 2019 · 1 comment

Comments

@nuaacyy
Copy link
Owner

nuaacyy commented Jan 13, 2019

请你谈谈控制反转?

@nuaacyy
Copy link
Owner Author

nuaacyy commented Jan 13, 2019

控制反转(Inversion of Control,缩写为IoC),是面向对象编程中的一种设计原则,可以用来减低计算机代码之间的耦合度。其中最常见的方式叫做依赖注入(Dependency Injection,简称DI),还有一种方式叫“依赖查找”(Dependency Lookup)。通过控制反转,对象在被创建的时候,由一个调控系统内所有对象的外界实体,将其所依赖的对象的引用传递给它。也可以说,依赖被注入到对象中。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant