B04.JEE Frameworks‎ > ‎02.SSH‎ > ‎

02.(C)Spring Framework 3

http://www.springsource.org/
http://en.wikipedia.org/wiki/Spring_Framework
http://zh.wikipedia.org/zh-tw/Spring_Framework



Spring 中包含的關鍵特性


強大的基於 JavaBeans 的採用控制翻轉(Inversion of Control,IoC)原則的配置管理,使得應用程式的組建更加快捷簡易。
一個可用於從 appletJava EE 等不同執行環境的核心 Bean 工廠
資料庫事務的一般化抽象層,允許宣告式(Declarative)事務管理器,簡化事務的劃分使之與底層無關。
內建的針對 JTA 和 單個 JDBC 資料源的一般化策略,使 Spring 的事務支援不要求 Java EE 環境,這與一般的 JTA 或者 EJB CMT 相反。
JDBC 抽象層提供了有針對性的異常等級(不再從SQL異常中提取原始代碼),簡化了錯誤處理,大大減少了程式設計師的編碼量。再次利用JDBC時,你無需再寫出 另一個 '終止' (finally) 模組。並且面向JDBC的異常與Spring 通用資料存取物件(Data Access Object)異 常等級相一致。
以資源容器,DAO 實作和事務策略等形式與 HibernateJDOiBATIS SQL Maps 整合。利用眾多的翻轉控制方便特性來全面支援,解決了許多典型的Hibernate整合問題。所有這些全部遵從Spring通用事務處理和通用資料存取物 件異常等級規範。
靈活的基於核心 Spring 功能的 MVC 網頁應用程式框架。開發者透過策略介面將擁有對該框架的高度控制,因 而該框架將適應於多種呈現(View)技術,例如 JSPFreeMarkerVelocityTilesiText 以及 POI。值得注意的是,Spring 中間層可以輕易地結合於任何基於 MVC 框架的網頁層,例如 StrutsWebWork,或 Tapestry
提供諸如事務管理等服務的面向方面編程框架。

在設計應用程式Model時,MVC 模式(例如Struts)通常 難於給出一個簡潔明了的框架結構。Spring卻具有能夠讓這部分工作變得簡單的能力。程式開發員們可以使用Spring的 JDBC 抽象層重新設計那些複雜的框架結構。


Modules


Required Spring Framework jar Files
http://static.springsource.org/spring/docs/upgrade/spring3/html/index.html
http://static.springsource.org/spring/docs/upgrade/spring3/html/ch02s06.html



The Spring Framework comprises several modules that provide a range of services:
Inversion of Control container: configuration of application components and lifecycle management of Java objects
Aspect-oriented programming: enables implementation of cross-cutting routines
Data access: working with relational database management systems on the Java platform using JDBC and object-relational mapping tools
Transaction management: unifies several transaction management APIs and coordinates transactions for Java objects
Model-view-controller: a HTTP and Servlet-based framework providing hooks for extension and customization
Remote Access framework: configurative RPC-style export and import of Java objects over networks supporting RMI, CORBA and HTTP-based protocols including web services (SOAP)
Convention-over-configuration: a rapid application development solution for Spring-based enterprise applications is offered in the Spring Roo module
Batch processing: a framework for high-volume processing featuring reusable functions including logging/tracing, transaction management, job processing statistics, job restart, skip, and resource management
Authentication and authorization: configurable security processes that support a range of standards, protocols, tools and practices via the Spring Security sub-project (formerly Acegi Security System for Spring).
Remote Management: configurative exposure and management of Java objects for local or remote configuration via JMX
Messaging: configurative registration of message listener objects for transparent message consumption from message queues via JMS, improvement of message sending over standard JMS APIs
Testing: support classes for writing unit tests and integration tests


教學篇


Spring Web Modules
  • commons-logging-1.1
  • JSTL 1.1


Spring 3 Hello World Example
http://netbeans.org/kb/docs/web/quickstart-webapps-spring.html



JavaEye, Spring, http://www.javaeye.com/forums/tag/Spring

http://www.infoq.com/presentations/donald-overview-spring-3.0-web-stack
Spring3.0的变化(2):特性

敬献Spring Security-3.x官方文档中文版


http://howsun.blog.sohu.com/107477052.html
Comments