Spring
Spring
Important |
Spring is an application framework. Unlike single-tier frameworks such as Struts or Hibernate, Spring aims to help structure whole applications in a consistent, productive manner, pulling together best-of-breed single-tier frameworks to create a coherent architecture. |
Problems with the Traditional Approach to J2EE
傳統J2EE方法存在的問題
- J2EE applications tend to contain excessive amounts of "plumbing" code.多
- Many J2EE applications use a distributed object model where this is inappropriate.雜
- The EJB component model is unduly complex.不當
- EJB is overused.過度使用
- Many "J2EE design patterns" are not, in fact, design patterns, but workarounds for technology limitations.技術跟不上
- J2EE applications are hard to unit test.測試難
- Certain J2EE technologies have simply failed.
Enter Spring
接觸Spring
- Inversion of Control container:倒置控制
- Aspect-Oriented Programming (AOP) framework:
- Data access abstraction:
- JDBC simplification:
- Transaction management:
- MVC web framework:
- Simplification for working with JNDI, JTA, and other J2EE APIs:
- Lightweight remoting:
- JMS support:
- JMX support:
- Support for a comprehensive testing strategy for application developers:
The key Spring values can be summarized as follows:
· Spring is a non-invasive framework.非侵入
· Spring provides a consistent programming model, usable in any environment.
· Spring aims to promote code reuse.復用
· Spring aims to facilitate Object Oriented design in J2EE applications.
· Spring aims to facilitate good programming practice, such as programming to interfaces, rather than classes.面向接口
· Spring promotes pluggability.性能
· Spring facilitates the extraction of configuration values from Java code into XML or properties files.
· Spring is designed so that applications using it are as easy as possible to test.
· Spring is consistent.
· Spring promotes architectural choice.
· Spring does not reinvent the wheel.
posted on 2009-07-25 14:57 Jxi 閱讀(152) 評論(0) 編輯 收藏 所屬分類: Spring FrameWork