The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Monday, May 26, 2008

Spring modules

Spring has seven well defined modules which collaborates to deliver everything that you may need to build an enterprise application. Lets discuss one by one in brief:

1. The Core Container: This i responsible for providing fundamental services of the Spring framework. It uses powerful Inversion of control (IoC) which i discussed in previous topic to separate the bean configuration and wiring stuff from the core application logic.

2. Application Context: This modules makes spring capable to support internalizations, message handling, application life cycle events etc. It provides a lot of useful and necesaary services like JNDI, email, scheduling, EJB integration and integration with template generator frameworks like Velocity.

3. AOP Module: AOP that is, Aspect oriented programming is supported very well using Spring's AOP module. AOP basically helps in separating the concerns. Unlike EJB style coding days where implementing the business logic involves looking up context (thru jndi) etcs in AOP that part is totally separated out. Using dependency injections required context and beans are avaialble to other beans and thus make the code clean and independent.

4. JDBC and DAO abstraction: Spring instead of re-inventing the wheel provide the hooks to well known and stable ways of doing DB stuff like JDBC, DAO etc. This module in spring hides all the boilerplate code and also provides one more layer to throw exceptions which are more meaningful over SQL type exceptions.

5. OR mapping integration: Object relational mapping tools like hibernate, toplink, JDO etc are supoorted by spring's OR module. Spring does not have any owned ORM solution as already good orm solutions are available.

6. Web module: Web module is bascially build on the top of Application context module. Web modules sets the platform for supporting web applications. This module does the additional tasks like programmatic binding of request objects to the business objects, multipart requests for file upload support etc.

7. MVC framework: Spring provides support to plug-in any popular MVC framework like struts. But advantage of using spring's own MVC framework is the use of Ioc which helps in separating the business layer from the controller logic.

Post a Comment