为什么要用弹簧? [英] why use spring?
问题描述
我是否应该使用spring
令我非常困惑 原因-我想开发一个松耦合代码,我认为可以使用Factory模式和接口进行开发...并且依赖注入也可以不使用spring来实现...(通过传递参数)..为什么我应该再使用spring ??这是我不知道的spring的其他好处..如果您可以给我代码示例比较spring代码和简单的Java代码(接口),这将非常有帮助... 表明春天的代码如何更好 ...
谢谢
I am very much confused whether i should use spring
Reason - I want to develop a loosely coupled code which i think can be developed using Factory pattern and interfaces... and dependency injection can be implemented without using spring too...(by passing parameters).. why should i use spring then ?? Which are the other benefits of spring which i am unaware of..It would be really helpful if you could give me code samples comparing spring codes and simple java code(interfaces)...indicating how spring code is better...
Thanks
推荐答案
您必须阅读Martin fowler的文章 http ://martinfowler.com/articles/injection.html
You must go through Martin fowler's article http://martinfowler.com/articles/injection.html
这篇关于为什么要用弹簧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!