» Java开发网 » Design Pattern & UML
打印话题 寄给朋友 订阅主题
|作者||Re:IOC和Dependency Injection [Re:hesanxu512]|
于 2004-10-27 01:26
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
|9685||IOC和Dependency Injection||hesanxu512||2600||2004-10-26 00:40|
|8252||Re:IOC和Dependency Injection||zerol||175||2004-10-26 00:57|
|8194||Re:IOC和Dependency Injection||floater||212||2004-10-26 01:08|
|8294||Re:IOC和Dependency Injection||Jove||74||2004-10-26 12:23|
|8143||Re:IOC和Dependency Injection||hesanxu512||39||2004-10-26 12:51|
|8373||Re:IOC和Dependency Injection||think||406||2004-10-26 19:38|
|8094||Re:IOC和Dependency Injection||hesanxu512||93||2004-10-26 22:11|
|8682||Re:IOC和Dependency Injection||floater||2357||2004-10-27 01:26|
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent |
Copyright © 2002-2018 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号
客服电话 0592-8750026 客服信箱 email@example.com 客服QQ 714923