Jump to content

Spring framework

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Hyad (talk | contribs) at 23:12, 12 March 2006 (External links: html for dtd). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Spring framework is a layered Java/Java EE/Microsoft .NET application framework based on code published in Expert One-on-One Java EE Design and Development (ISBN 0-7645-4385-7). It was developed at first by Rod Johnson, Juergen Hoeller et al. The Spring Framework provides a simple approach to development that does away with numerous properties files and helper classes littering the codebase.

Key features of Spring include:

  • Powerful JavaBeans-based configuration management, applying Inversion-of-Control (IoC) principles. This makes wiring up applications quicker and easier.
  • Generic abstraction layer for database transaction management, allowing for pluggable transaction managers, and making it easy to demarcate transactions without dealing with low-level issues.
  • Built-in generic strategies for JTA and a single JDBC DataSource. In contrast to plain JTA or EJB CMT, Spring's transaction support does not require Java EE environments.
  • JDBC abstraction layer that offers a meaningful exception hierarchy (no more pulling vendor codes out of SQLException), simplifies error handling, and greatly reduces the amount of code programmers need to write. You'll never need to write another 'finally' block to use JDBC again. The JDBC-oriented exceptions comply with Spring's generic DAO (Data Access Object) exception hierarchy.
  • Integration with 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 with Spring's generic transaction and DAO exception hierarchies.

As MVC patterns (such as Struts) often have difficulty in providing a clear framework for designing the Model part of an application, Spring's ability to work easily with such patterns means that developers can quickly refactor many unsuccessful approaches to make use of Spring's JDBC abstraction layer.