搜尋此網誌

2011年12月7日 星期三

Spring 特點(feature)

Spring includes:

  • 最完整的輕量化容器(lightweight container), providing centralized, automated configuration and wiring of your application objects. 這一個容器是非侵入性的(non-invasive), 可以由一系列的(POJOs)組成一個複雜的system ,並且遵循著一致化和透明的設計概念. The container brings agility and leverage, and improves application testability and scalability by allowing software components to be first developed and tested in isolation, then scaled up for deployment in any environment (J2SE or J2EE).

  • 為transaction management提供一個共同的抽象層(abstraction layer),允許可抽換式的交易管理, 使得劃分交易變的很簡單而不需要去處理low-level issues. Generic strategies for JTA and a single JDBC DataSource are included. 不同於原有的 JTA(Java Transaction Interface) or EJB CMT, Spring所支援的交易管理並不僅僅限於J2EE下的環境.

  • JDBC的抽象層 提供了一個有意義的例外架構, (no more pulling vendor codes out of SQLException), 簡化了錯誤處理,並且大大降低了你所需要寫的程式碼. You'll never need to write another finally block to use JDBC again. The JDBC-oriented exceptions comply to Spring's generic DAO(Data Access Objects) exception hierarchy.

  • 整合了 Toplink, Hibernate, JDO, and iBATIS SQL Maps: in terms of resource holders, DAO implementation support, and transaction strategies. First-class Hibernate support with lots of IoC convenience features, addressing many typical Hibernate integration issues. All of these comply to Spring's generic transaction and DAO exception hierarchies.

  • AOP(Aspect-oriented programming) functionality, fully integrated into Spring configuration management. You can AOP-enable any object managed by Spring, adding aspects such as declarative transaction management. 假如你正在Tomcat使用單一的資料庫或是任何其他沒有JTA支援的web容器,有了Spring, 你可以宣告(declarative)交易管理而不必依靠EJB,甚至不必JTA.

  • 靈活的MVC網頁應用程式框架. This framework is highly configurable via strategy interfaces, and accommodates multiple view technologies like JSP, Velocity, Tiles, iText, and POI. Spring中介層可以輕易地結合任何Web MVC框架的Web層,好比Struts, WebWork, or Tapestry.

你可以在任何的J2EE環境使用Spring所有的功能. Spring是以商業邏輯和DAO可重複使用,並且不

受限於任何特定的J2ee服務為中心思想而設計的. 物件可以毫無障礙的跨越:J2ee的環境, 單機應

用程式, 以及測試環境重複使用.

Spring的階層架構給予你很多的彈性. 它所有的功能都是根據前一個lower level而來的. 比如說,你

可以使用JavaBeans的設定管理(configuration management)而不必使用到MVC framework or

AOP support. 但是假如你要使用MVC framework or AOP support,你會發現到它們都是建立在核

心的Spring設定裡,所以你在這方面的知識可以立刻派上用場.




節錄翻譯自http://www.springsource.org/spring-core#documentation

沒有留言:

張貼留言