什么是依赖注入 [英] What is Dependency Injection

查看:88
本文介绍了什么是依赖注入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以给依赖注入一个简单的定义吗?

Can somebody give a simple definition for Dependency Injection?

Thanks for your time!

推荐答案

依赖注入(DI)是面向对象的计算机编程中的一种设计模式,其目的是减少软件组件之间的耦合. /> 参考: http://en.wikipedia.org/wiki/Dependency_injection [依赖关系注入以实现松耦合 [
Dependency injection (DI) is a design pattern in object-oriented computer programming whose purpose is to reduce the coupling between software components.
Ref:http://en.wikipedia.org/wiki/Dependency_injection[^]

Dependency Injection for Loose Coupling[^]


http://en.wikipedia.org/wiki/Dependency_injection [
http://en.wikipedia.org/wiki/Dependency_injection[^] should be all you need to read for a first picture.

Best Regards,

—MRB


这篇关于什么是依赖注入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆