The SpringFramework.
Introduction.
The spring framework contains a number of modules build around a core module. The core module
contains also a number of helper classes. These helper classes avoid you re-invent the wheel and rewritte always the same code to
manage 3rd party products. By example, Spring offers helper class to manage JMS message.
Spring also offer an abstraction layer between
the specifications and the implementation done by providers.
Main Concepts.
The SpringFramework is divided in modules (Core,
DAO, ORM, JEE, Web and AOP). The SpringFramework core is based on the IoC (Inversion of Control) and DI (Dependency Injection)
developed by Martin Fowler in 2004. The SpringFramewok Core is a bean container. Each bean is declared in an xml file and by using
the IoC and DI principle, their configuration can be decoupled from the code itself.
The DAO package provides an abstraction
layer to manage JDBC access and transaction management.
The ORM layer provide an integration for the most well known Object-relational
mapping product, such as Hiberneate, I-Batis... It also provide since version 2.0 an integration with JPA.
The AOP (Aspect Oriented
Programming) allows you to decouple the general functionality by implementing method-interceptors and pointcuts. A good example for
using AOP is the authentication/autorisation issue. By using AOP you can surrounded all your methods with a code checking the authentication/autorisation.
Since
version 2.0, SpringFramework allows you to extends the standard Spring schema by creating your own shema. A number of
schema's are provided by Spring to simplify the creation of standard bean such as transaction, jndi-lookup... aop... Other frameworks
based on Spring start to use this technique to simplify your Application Context file.