Krishna
Krishna

Reputation: 7294

When to choose Spring Framework?

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?

Upvotes: 5

Views: 2368

Answers (2)

Ralph
Ralph

Reputation: 120851

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.

Upvotes: 2

abalogh
abalogh

Reputation: 8281

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.

Upvotes: 4

Related Questions