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

您没有登录

» Java开发网 » Design Pattern & UML  

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

Java Jedi

总版主


发贴: 3233
积分: 421
于 2004-10-27 01:26 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
1. yes, manage those xml files are becoming an issue as size gets larger. So we have Spring IDE eclipse plugin and JBuilder plugin from one of our moderators here. As we have more experience, the tools will get mature too. I would like to see a tool close to visio, probably built on top of jgraph, we can drag beans, write properties and the tool would write the xml files for us.

2. IoC does not necessarily introduce dependencies, we can still programatically hardcode the dependencies without IoC, this is the beauty of it, it doesn't force us to do anything, it only provides convenience for us. In one of my projects, I have to do it in both ways in order to run in different environments, it works fine.

3. I wouldn't worry about the security in the code. We have to trust the system. If the config file is compromised, probably others are compromised too. However, this is a valid concern, definitely.

One thing I like this article is that this one ties the conection between IoC and design principles(a quick chinese reference is Yan's Java and patterns). I've waiting for this in chinese for a long time. When we talk about design patterns, we should tie them to the underlying principles; when we do coding, we should follow these principles. I want to see a chinese book talking about a combination of design principles, design patterns, dependency and stability, give the logic chain of deduction, describe the consequences of various options/scenarios. Blindly copying and single-minded thinking are not quite understandable for others. For example, Yan's Java and patterns has both design principles and patterns, but doesn't put both together in a logical chain. I went to javaeye and jaction sites last night, went through some of the posts there, some folks can't get the dao pattern right, they took care of one thing and broke 5 others. That's not good. An DAO interface is setting in the middle between databases and business layers, simple and easy. Not quite, DAOs belong to the business layer, and interact with database layer. Folks should understand why and then design DAOs(It's just that DIP, and others). (Rod's book has just one line on this. When I saw that line, I laughed, he put that line somewhere and expected readers can pick it up without any further explanation, no way, I know myself I am igorant sometimes).



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code

话题树型展开
人气 标题 作者 字数 发贴时间
11204 IOC和Dependency Injection hesanxu512 2600 2004-10-26 00:40
9657 Re:IOC和Dependency Injection zerol 175 2004-10-26 00:57
9579 Re:IOC和Dependency Injection floater 212 2004-10-26 01:08
9734 Re:IOC和Dependency Injection Jove 74 2004-10-26 12:23
9517 Re:IOC和Dependency Injection hesanxu512 39 2004-10-26 12:51
9786 Re:IOC和Dependency Injection think 406 2004-10-26 19:38
9447 Re:IOC和Dependency Injection hesanxu512 93 2004-10-26 22:11
10232 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