Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring 3.0 vs Java EE 6.0 [closed]

I'm confronted with a situation...

I've been asked to give an advise regarding which approach to take, in terms of Java EE development between Spring 3.0 and Java EE 6.0. I was, and still am, a promoter of Spring 2.5 over classic Java EE 5 development, specially with JBoss, I even migrated old apps to Spring and influenced the re-definition of the development policy here to include Spring specific APIs, and helped the development of a strategic plan to foster more lightweight solutions like Spring + Tomcat, instead of the heavier ones of JBoss, right now, we're using JBoss merely as a Web container, having what I call the "container inside the container paradox", that is, having Spring apps, with most of its APIs, running inside JBoss, So we're in the process of migrating to tomcat.

However, with the coming of Java EE 6.0 many features, that made Spring attractive at that time, easy deployment, less-coupling, even some sort of D.I, etc, seems to have been mimicked, in one way or the other. JSF 2.0, JPA 2.0, WebBeans, WebProfiles, etc.

So, the question goes...

From your point of view, how safe, and logical, it is to continue to invest in a non-standard Java EE development framework like Spring given the new perspectives offered by Java EE 6.0?

Can we talk about maybe 3 or 4 more years of Spring development, or do you recommend early adoption of Java EE 6.0 APIs and its practices?

I'll appreciate any insights with this.

like image 257
Jose Diaz Avatar asked May 12 '10 21:05

Jose Diaz


People also ask

Is Java EE still relevant 2020?

Almost 4 out of 10 people use the latest version of Java EE while Java EE 7 still remains quite popular.

Is Java EE required for Spring?

As of Spring Framework 5.0, Spring requires the Java EE 7 level (e.g. Servlet 3.1+, JPA 2.1+) as a minimum - while at the same time providing out-of-the-box integration with newer APIs at the Java EE 8 level (e.g. Servlet 4.0, JSON Binding API) when encountered at runtime.

Does Java EE still exist?

That name would stick all the way to September 2017, when something major happened. See, in September 2017, Oracle decided to give away the rights for Java EE to the Eclipse Foundation (the language is still owned by Oracle).


1 Answers

The crucial point IMHO is not the one of features. In that regard, Spring will always be ahead of JavaEE as it's natural for OpenSource VS. a Standard. So one fact is, that you get the new features much earlier with Spring that with JavaEE (e.g. container integration testing is a new feature in JavaEE 6 and has been available in Spring for ages).

The most important point IMHO is the one of lifecycles for administration and development. When you choose JavaEE, you tie your programming model to your infrastructure. Usually app server vendors are not the fastest adopting new standard's versions (blame WebSphere, JBoss, what have you). So this means we probably won't see production ready, JavaEE 6 supporting products by the big vendors before end of the year.

Even if that is the case then you still have to take the hurdle of your administration, IT department and budget controlling managers to be willing to upgrade to this shiny new version. Coming from this side, JavaEE 6 is not even an option to many shops. You can choose what ever you like to deploy your apps to? You wanna choose Glassfish for production? Go ahead, try. Most shops aren't in such a "comfortable" situation.

Exactly contrary: Spring. Decoupled programming model from infrastructure. Go take current 3.0.x and use @Inject, JPA 2 and the like in your Tomcat or legacy application server.

like image 108
Oliver Drotbohm Avatar answered Oct 02 '22 16:10

Oliver Drotbohm