How does Spring fit into my application architecture? How does Spring fit into my application architecture? spring spring

How does Spring fit into my application architecture?


First, you can make your web application without Spring. But Spring will greatly facilitate things. Spring framework is a lightweight, non-invasive. Spring is like a kind of conductor. Among other things Spring helps you in:

  1. To keep your objects loosely coupled. This will make your application more flexible and open to future changes

  2. Powerful support for transactions through the AOP (Aspect Oriented Programming).

  3. Object-relational mapping (ORM) integration module. Spring doesn’t attempt to implement its own ORM solution, but does provide hooks into several popular ORM frameworks, including Hibernate, Java Persistence API, Java Data Objects, and iBATIS SQL Maps. Spring’s Transaction management supports each of these ORM frameworks as well as JDBC.

  4. The Spring MVC framework. Even though Spring integrates with several popular MVC frameworks, it also comes with its own very capable MVC framework that promotes Spring’s loosely coupled techniques in the web layer of an application.

A good book about Spring: Pro Spring


Spring, as noted in this review is non-invasive. It just wires your application components. And provides useful classes that make using other frameworks easier (JMS, JPA, etc). Spring doesn't force you to use its classes or interfaces anywhere.

What it handles is the creation of your components (objects), so that you can refer to a class' dependencies, without instantiating them. I.e. you say what your class needs, not how it is obtaining it. This makes the application very flexible.

That's in short - for more, read the linked article. It's not about the latest version, but that doesn't matter.


In addition to dependency injection, Spring offers features like declarative transaction management, simple integration with ORM, aspect-oriented programming support and many other nice things.

For documentation see Spring reference: http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html