Skip to content

控制反转和依赖注入 #21

@WeihanLi

Description

@WeihanLi

控制反转(Inversion of Control)

控制反转 是一种是面向对象编程中的一种设计原则,用来减低计算机代码之间的耦合度。

其基本思想是:借助于“第三方”实现具有依赖关系的对象之间的解耦。

依赖注入(Dependency Injection)

依赖注入 就是将实例变量传入到一个对象中去(Dependency injection means giving an object its instance variables)。

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions