因为容器能够在运行时把组件注入到依赖它的组件中,所以DI提供了消除组件间高度耦合的另外一种方式。
DI provides yet another way to eliminate high coupling between components, because the container can inject a component at run time into a component that relies on it.
它提供一个依赖性注入容器,允许自动管理一个对象的生命周期。
It provides a dependency injection container and enables an object's lifecycle to be automatically managed.
当我听闻这一消息后,就立即加入了这个项目,开始对核心的依赖注入容器以及AOP框架进行移植。
As soon as I heard about it, I joined the project and we started porting the core Dependency Injection container and AOP framework.
这就是依赖注入容器责无旁贷的,它是一个智能的对象工厂。
That’s where the Dependency Injection container comes in. It is a smart object factory.
不论使用哪个容器,现在已经设置了注入的依赖项。
In either case, you have now set up your dependencies for injection.
核心特性如依赖注入(DI)容器、AOP以及数据访问框架,都可以非常好地应用在任意的。NET应用程序中。
Core features, such as the Dependency Injection (DI) container, AOP and the data access framework can be used in pretty much any.net application.
通过依赖注入,轻量级容器减少了组件间的依赖性。
Through dependency injection, lightweight containers reduce dependencies between components.
现在只需要调用需要这些依赖项并允许容器执行注入的代码。
Now you need merely to call the code that needs those dependencies and allow the container to perform its work.
它提供了用SpringIoC容器往We b组件注入依赖的一些方式。
It offers several ways of using Spring IoC container for injecting dependencies into the web components.
ObjectBuilder是一个用来构建依赖注入容器的框架。
ObjectBuilder was a framework which was used to build Dependency Injection containers.
NateKohari发布了针对。NET的依赖注入容器Ninject的1.0版本。
Nate Kohari released version 1.0 of his dependency injection container for.net called Ninject.
它没有提供许多附加物,但它具有完整的依赖注入容器。
It won't give you a lot of extras, but it has a complete dependency injection container. PicoContainer also has some unique properties.
UnityApplicationBlock (Unity)是一个轻量级的,可扩展的依赖注入容器。
The Unity Application Block (Unity) is a lightweight, extensible dependency injection container.
我讨论了DI的动机和定义,并用一个示例,演示了容器如何可以把依赖项从一个组件注入到另一个组件。
I discussed the motivation and definition of di and showed an example of how a container can inject dependencies from one component into another.
这三种容器都源于依赖注入,但每种容器都具有极不相同的特征。
All these containers flow from dependency injection, but each has a vastly different character.
有一个明确的,功能齐全的容器对于我们围绕依赖注入提供更好的指导和基于容器的基础架构。
Having an explicit, fully featured container that we can use unencumbered allows us to provide better guidance around DI and container based architectures.
作为一个快速的摘要,依赖注入容器就是一个用于构建高度松耦合的软件的工具。
As a quick summary, a di container is a tool you can use to support building highly decoupled software.
另一个目标是提高依赖注入容器在微软内外的使用。
Another goal is to raise the profile of Dependency Injection both inside and outside of Microsoft.
它是使用依赖性注入容器从头构建的。
It's built from the ground up using a dependency injection container.
有一个微软提供的容器有助于依赖注入在广大微软。NET社区和微软内部开发人员的使用。
Having a container from Microsoft helps promote DI both to the general Microsoft.net developer community and internal Microsoft developers as well.
RB:为什么要开发一个新的依赖注入容器?
它们主要用在所谓的ioc容器中,这些容器以其他组件的形式将依赖项注入到一个组件中。
They are mostly used within so-called IoC containers, which inject dependencies into a component in the form of other components.
Spring的IOC实现使用依赖性注入有效地将控制从应用程序代码 “反转”到 Spring 容器。
Spring's IOC implementation uses dependency injection to effectively "invert control" from your application code to the Spring container.
比如说,开源依赖注入(DI)容器Seaser和需求开发联盟(Requirement development alliance)主持的 openthlogy项目,就有可能在全球范围上产生影响。
For instance, Seaser, the opensource DI container, and openthlogy which is hosted by the Requirement development alliance, could be valuable internationally.
Unity是一个轻量级,可扩展的依赖注入容器,支持构造函数,属性和方法调用注入。
Unity is a lightweight, extensible dependency injection container with support for constructor, property, and method call injection.
作为一个简单依赖性注入框架,Blueprint对于We b容器与Blueprint容器之间的桥接存在完全相同的问题。
Blueprint as a plain dependency injection framework has exactly the same problem with bridging between the Web container and the Blueprint container.
InfoQ:依赖注入(DI)容器将是后续版本的一个新特性,能否谈谈这一新特性呢?
InfoQ: Can you discuss the new Dependency Injection (di) container feature that will be part of the future release of the framework?
RB:已经有相当多的依赖注入容器,又是什么动机使得你们团队创建了Unity ?
RB: There are quite a few DI containers already, what was the motivation by your team in creating Unity?
Web容器将在这些组件中检测相关的注释,然后在开始组件的生命周期之前注入所需的依赖关系。
The Web container will detect annotations on such components and then inject the necessary dependencies before the component lifecycle is initiated.
微软发布了支持VisualStudio 2008的新版本EnterpriseLibrary 4.0,同时也发布了他们的依赖注入容器Unity应用程序块的1.1版本。
Microsoft released a version of their Enterprise Library 4.0 for Visual Studio 2008 and at the same time, Unity 1.1 application block, their dependency injection container.
应用推荐