Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:IOC和Dependency Injection [Re:hesanxu512]
think





发贴: 240
积分: 91
于 2004-10-26 19:38 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
提点不同意见:
相对于IoC,DIP反映的是更广泛的一种设计原则,即针对抽象编程,在OO中的体现是针对Interface/Abstract BaseClass编程,在Generics中是针对Parameterized Type编程,分别对应一系列设计技巧和模式。

而IOC更关注Dependency Injection,当然前提是你要基于抽象编程,即遵从DIP原则。

另外对于IoC,我想有三点值得考虑:
1.是否需要依赖的注入,以及随之而来的依赖管理问题(配置文件)。

2.对有关IoC容器的依赖性问题,普遍采用IoC后会建立对IoC容器的依赖,这好像正是我们要消除的问题,当然这个问题不是很重要。

3.IoC容器管理的组件/模块,是开放的组件/模块,是否需考虑随之而来的系统信任/安全问题,是否需要采用一定的防御性编程来保证组件正确的状态,以及保证操作的先决条件和不定式。





话题树型展开
人气 标题 作者 字数 发贴时间
11215 IOC和Dependency Injection hesanxu512 2600 2004-10-26 00:40
9669 Re:IOC和Dependency Injection zerol 175 2004-10-26 00:57
9590 Re:IOC和Dependency Injection floater 212 2004-10-26 01:08
9746 Re:IOC和Dependency Injection Jove 74 2004-10-26 12:23
9526 Re:IOC和Dependency Injection hesanxu512 39 2004-10-26 12:51
9798 Re:IOC和Dependency Injection think 406 2004-10-26 19:38
9457 Re:IOC和Dependency Injection hesanxu512 93 2004-10-26 22:11
10246 Re:IOC和Dependency Injection floater 2357 2004-10-27 01:26

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923