5

HI,

I would like to know when we have to choose the Spring framework. Is there any clear advantage on choosing the spring framework. I don't want to know the differences, instead of choosing the other technologies like J2EE etc. why we particularly go with Spring?

Nilesh
  • 4,137
  • 6
  • 39
  • 53
Krishna
  • 7,154
  • 16
  • 68
  • 80

2 Answers2

4

The question is if you are talking about the core Spring framework, or the family of Spring frameworks. (Spring Batch, Spring MVC, Spring Web Flow, Spring Web Services etc)

Core framework features:

  • Mature dependency injection framework => achieving unit-testability is really easy
  • AOP-support
  • Good IDE support (STS)
  • *Template: utility classes that help doing the most regular things in a very easy and boilerplate-code-free way. (JdbcTemplate, HibernateTemplate, JmsTemplate, etc)
  • Great amount of resources. (videos, blogs, forums, etc)
  • No need for a 'real' application server
  • It's non-intrusive: as far as I know, at the development of any Spring project is a really important point to give the ability to the developer the 'pulling out' of Spring of the project at any given time and leaving as minimal a footprint in the codebase as possible.

But In my opinion its strength and power really shows only when you start to use one of the frameworks I mentioned in the beginning. Basically pick anyone of those and you'll find a really great, actively developed framework for a given set of tasks, with of course deep Spring integration.

abalogh
  • 8,239
  • 2
  • 34
  • 49
  • Can you tell me which is in Spring which is not in JEE. That means clear point of choosing the spring for our project. – Krishna May 30 '11 at 08:42
  • the answer to that one really depends on which version of JEE are you able to use? 5/6? – abalogh May 30 '11 at 08:46
2

You should use Spring if you have only a J2EE Server or a Servlet Container. If you have a Java EE (5/)6 Server, then the difference to Spring is not so big.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Ralph
  • 118,862
  • 56
  • 287
  • 383