What is DI Container

简介: A DI CONTAINER is a software library that can automate many of the tasks involved incomposing objects and managing their lifetimes.

A DI CONTAINER is a software library that can automate many of the tasks involved in
composing objects and managing their lifetimes. Although it’s possible to write all the
required infrastructure code with POOR MAN’S DI, it doesn’t add much value to an
application. On the other hand, the task of composing objects is of a general nature
and can be resolved once and for all; this is what’s known as a Generic Subdomain.1

 

A DI CONTAINER is a library that provides DI functionality.

DI CONTAINERS are also known as Inversion of Control (IoC) Containers or
(more rarely) Lightweight Containers.

 

Don’t expect a DI CONTAINER to magically make tightly coupled
code loosely coupled. A DI CONTAINER can make the use of DI more efficient,
but an application must first and foremost be designed with the DI patterns
and techniques in mind.

 

 

目录
相关文章
|
1月前
|
应用服务中间件 nginx 容器
error: a container name must be specified for pod pod-base, choose one of: [nginx busybox]
error: a container name must be specified for pod pod-base, choose one of: [nginx busybox]
21 0
|
10月前
|
运维 Kubernetes Devops
K8S Container解析
今天,我们聊一下Kubernetes Container相关话题,什么是Container?
113 0
|
监控 Java jenkins
Docker基础(四)——DI、CD(二)
Docker基础(四)——DI、CD
117 0
Docker基础(四)——DI、CD(二)
|
Java jenkins 持续交付
Docker基础(四)——DI、CD(一)
Docker基础(四)——DI、CD
192 0
Docker基础(四)——DI、CD(一)
|
Kubernetes 关系型数据库 MySQL
kustomize (五) 使用vars将 k8s runtime 数据注入容器
kustomize (五) 使用vars将 k8s runtime 数据注入容器
|
Java API Spring
|
Docker 容器
docker出现问题:The container name “/XXX“ is already in use by container 解决方案
docker出现问题:The container name “/XXX“ is already in use by container 解决方案
647 0
docker出现问题:The container name “/XXX“ is already in use by container 解决方案
|
容器 Java Spring
什么是IoC和DI?DI是如何实现的?
IoC叫控制反转,是Inversion of Control的缩写,DI(Dependency Injection)叫依赖注入,是对IoC更简单的诠释。控制反转是把传统上由程序代码直接操控的对象的调用权交给容器,通过容器来实现对象组件的装配和管理。
3103 0
|
Web App开发 JavaScript 前端开发
bootstrap中container类和container-fluid类的区别
近几天才开始系统的学习bootstrap,但马上就遇到了一个‘拦路虎’:container和container-fluid到底什么区别。
1016 0
|
C++ Docker 容器
replicated mode vs global mode - 每天5分钟玩转 Docker 容器技术(105)
Swarm 可以在 service 创建或运行过程中灵活地通过 --replicas 调整容器副本的数量,内部调度器则会根据当前集群的资源使用状况在不同 node 上启停容器,这就是 service 默认的 replicated mode。
1468 0