In his forum opening thread, we have:
Considering the recent release of Java EE 6 with the changes to EJB 3.1 and JPA to 2.0, why do we continue using the Spring Framework?
That's what I think:
Many of the ideas of Spring and Hibernate were adopted in EJB 3.x and JPA, decreeing the death of the entity beans in EJB 2.x and use of Javabeans (POJOs) as a basis for componentization model with access to enterprise. Now we have extensive use of annotations, effective use of design patterns and OO modeling of business components, the ability to define interfaces to business components, the presence of dependency injection as the modeling of components, etc..
So why should we still use the Spring Framework and not the Java EE 6?
Spring offers some advantages over Java EE.
- Spring has an evolved security model, through the Spring Security - when it is necessary to refine the security model, and we're based on Java EE / EJB we end up getting involved with proprietary APIs of the application server, which doesn't always have a satisfactory documentation.
- "Native" support for AOP, which opens up many possibilities for the testability, and allows to address in an elegant fashion non-trivial problems, which are beyond the model of Java EE components.
- In the Spring we will continue finding innovative initiatives, which puts it one step ahead, while in Java EE prevails standardization.
It is important to recognize that not always these factors are crucial for the projects, which makes the Java EE 6 (with various mechanisms already established in previous editions of Spring), a very attractive option.