摘要
研究了支持依赖注入的IoC容器的设计问题。其目的是减小容器中组件或对象间的耦合度,应用程序中的组件在运行时不再主动调用其协作组件或协作对象,而是由容器在程序运行期间动态地将应用程序所需的组件或对象注入到应用程序中。与当前存在的IoC容器相比,它能够实现更多的组件注册方式,组件的管理方式也更灵活,基于IoC容器进行的开发可以明显减小对象间及对象和服务间的耦合度,便于组件的重用,缩短程序开发的周期,构建清晰、简洁的解决方案。
Study the design and implementation of IoC containers. It aimed at reducing application,s coupling between application components in operation, no longer use their own initiative in collaboratk,n eomponents or collaborators, on the comtrary the container allows the configuration and wiring together of objects using dependency injection. Compared to the existing IoC containers it can achieve more components registered types, components management are more flexible. The use of IoC containers can clearly reduce the coupling between services for ease of components. The devdopment of software design is shorten, and will give developers a clear and concise solution,
出处
《计算机技术与发展》
2007年第1期91-93,97,共4页
Computer Technology and Development
关键词
翻转控制
依赖注入
轻量级容器
inverion of control
dependency injection
lightweight container