Seconds out, round one...again
Java EE 6 vs Spring - let's get ready to rumble
It has to be said - once Arun Gupta posted the blog title 'Why is Java EE better than Spring' it was obvious that it would awaken the Spring community. And unsurprisingly, they are up in arms over what they see as another trolling article against their framework.
He isn't exactly the only one to proclaim Java EE 6's worth over the current Spring framework, with Bill Burke and Lincoln Baxter III both writing similar posts. Arun starts the piece with the following note, hinting that he believes Spring is old hat:
Thank you Spring framework for filling the interim gap and providing functionality that is now included in the mainstream Java EE 6 application servers. The Java EE platform has evolved over the years learning from frameworks like Spring and provides all the functionality to build an enterprise application. Thank you very much Spring framework!
While Spring was revolutionary in its time and is still very popular and quite main stream in the same way Struts was circa 2003, it really is last generation's framework - some people are even calling it legacy.
Legacy? Although quoting fellow Java enthusiast Bill Burke, that was bound to cause trouble.
To be fair to Gupta, he goes on create a simple Hello World CRUD application in Java EE 6 and Spring and compares the deployable artifacts. He hits a stumbling block with Spring, opting to use Hibernate and MySQL via this blog and finds it no problem to do the same in Java with NetBeans. But I guess, given how involved he is with Oracle, that should have been a breeze.
He continues, using the tale of the tape of Java vs Spring when generating WARs to back up his argument.
The crux of Gupta's argument rests on the following points:
- "Functionality like security, persistence, and dependency injection is baked in a Java EE 6 compliant application server but needs to be individually managed and patched for a Spring application. This very quickly leads to a 'stack explosion.'"
- Spring's lack of up-to-dateness within sample projects (fairly valid)
- The choice of 14 Java EE 6 compliant application servers
- Vendor choice - The Java EE 6 platform is created using the Java Community Process where all the big players like Oracle, IBM, RedHat, and Apache are conritbuting to make the platform successful. Spring is VMWare alone.
- Better production support.
He concludes with the fact that any previous complexity in Java (J2EE 1.2, 1.3, and 1.4) had vanished. It may have led to the genesis of Spring back in 2004, yet now Java is back with a vengeance. 'This is 2012 and the name has changed to "Java EE 6" :-)'
Hardly surprisingly, SpringSource employees were quick to dispel Gupta's proclamation to undergo a 'Spring cleanup'. Some were angrier than others. Ollie Gierke dissected some of Gupta's claims with gusto, coming up with the following conclusions:
- the number of JARs, which would never naturally reach that amount in a typical Spring developer's project.
- Spring is more portable as you can get JPA2 working with Tomcat 5. The myth of portability is exactly that.
- Spring applications run on any Java EE container, so there's more freedom of choice.
There are others in his comment at the bottom of Gupta's post in more detail. Another Spring advocate and friend of Gupta, James Bayer was slightly more scathing with a bit more bite in debunking his claims:
I'm really surprised to see you trolling Spring like this. I realize that in your job as a Java EE evangelist that you want to advocate for products and frameworks that you are paid to advocate for, but I don't see the point in misrepresenting many of the attributes that people like about the Spring Framework.
I find it hard to believe that you actually believe your blog is a balanced and objective analysis. I must say that I never hear the question why should I use Java EE 6 versus Spring and I think it's mostly a contrived question. Evans Data surveys indicate that about 2/3 of Java developers are using or will use Spring. I guess if you're paid to travel around the world telling people not to use the most popular Java framework that you need to come up with reasons....
While Java EE 6 was finalized over 2 years ago, Spring has moved on to simplify and provide solutions to lots of other problem domains with Spring Data applied to NoSQL (MongoDB, GemFire, Riak, Redis, Neo4j) and Big Data (Hadoop)
This debate is getting pretty tiresome in our view. We agree with Bayer in part, that the argument appears to be coming from Oracle quarters in fuelling the fire. It's clear that these scuffles don't tend to help either side out, especially if disingenuous claims come into play.
But which side do you sit? Are you pro-Java EE 6 or Spring through and through. We'd love to hear your views.