Here goes the Java EE vs Spring debate again

Posted by Sourced Blog on April 7, 2017 1066 words, 5 minute read

For years now there has been a lot of animosity between the Spring community and the Java EE community. This goes back to the beginning years of the Spring framework. ONe cannot deny that the Java EE ecosystem at that time really was a mess and really not much fun to work with. Even Java EE supporters acknowledge that fact.

But times have changed and so have the frameworks. Java EE 7 is arguably the best release of the EE specification to date and to be honest, the Spring framework has contributed a lot to the progress Java EE has made and vice versa. CDI and the Spring DI container are very similar and the EJB3 specification and Spring beans also have a lot in common. It’s a symbiosis that has furthered the Java community as a whole and as such we’re still the most popular server side programming platform.

Because of the assertive and sometimes aggressive nature of the Spring community and users, there is a now a very vocal counter movement from the EE community. And I can’t really say I blame amy of them. Some attacks have been vitriolic and non-constructive, bent on making the other party lose face. And while there are olive branches being offered by both sides, it doesn’t seem to defuse the situation and bring the communities back together. But I really wonder why it would be necessary to bring the two communities together. While the animosity between the two parties hasn’t been civil sometimes, one cannot deny the fact that the atmosphere resulted in innovation on the EE side and standardisation on the Spring side. But the tone of the discussion could be dialed down a couple of notches.

While I don’t agree at all with the marketing games the Pivotal crew is playing, never missing a single article or report that says EE is becoming less popular and actively promoting those articles, one needs to remember that Pivotal is a commercial company, owned by Dell, a listed company. Most decisions in such companies tend to ignore community concerns or proper decorum for that matter. And on the EE side, Oracle and IBM have played similar games and like Pivotal, still do to this day. Perhaps not as visible as Pivotal, but still. But the real issue at hand is the fact that both communities do not reflect the opinions of the commercial companies that have a vested interest in one of the approaches and that the way those companies conduct their businesses leaves a bad impression on all of us, tainting the way we look at each other.

I’m a Spring framework user. I maintained (and still maintain) code that once was mentioned on the Spring website (Spring Rich Client). I have been a supporter for over 10 years and probably always will be. But do I support Pivotal’s below-the-belt hits to the EE community? No. Because it doesn’t serve any purpose except for promoting a commercial position, which I frankly don’t care about because I got into Spring for completely different reasons. Will I ever use EE? As a platform probably not, because Spring fills every need I have and I don’t see the point at the moment. Do I use EE specifications? Sure, I use JPA, JMS, JTA, … Have I tried EE solutions? Sure, I’ve played around with Payara Micro, WildFly Swarm and KumuluzEE, but in the end I decided it just wasn’t for me.

And in the EE community, similar voices exist. They have their own valid reasons to choose the EE approach over the Spring approach. And I’m fine with that, as long as the solutions they built with it fill a need, why should anyone have a problem with that. And like me, there are a lot of EE developers that will probably never use something like Spring Boot because their existing solutions provide the most efficient way for them to write software. They’ll probably have tried it and came to the conclusion it just wasn’t for them.

For most applications, it doesn’t really matter whether you’re using Spring or EE. A lot of the applications just use DI, some persistence layer and a REST layer. The choice between Spring or EE is then just that, a choice and any of them are the right choice. Sure, I can make arguments for use cases that are a wee bit harder to implement with Java EE, but there’s nothing that says the two approaches can coexist within the same system. So yeah, if you want to use Spring Data repositories in an EE application, what the hell is stopping you?

People need to realize how silly the fight really is. As developers, we’ve been blessed by not having one but two valid choices to build high-quality applications. And believe me when I say that there are much worse choices in the Java ecosystem to work with than Java EE or Spring. Instead of going at each other, how about we join forces and get rid of those in our industry?

Addendum: From reactions on Twitter I noticed some wording may be badly chosen. Aggresive may not have been the best term to describe what I wanted to convey and certainly not the atmosphere I wanted to create when I wrote the article. What I wanted to say is that riding on negative reports in order to promote your own strategy and/or solution is a bit questionable from a marketing perspective and could be perceived by some as an aggresive stance towards the strategy on the receiving end of the negative report. Spring as a strategy or solution doesn’t need to ride on negative reporting in order to promote its approach to writing Java server side software, it can use its technological merits and case studies for that and still be equally succesful at it. And like I said, the EE ecosystem isn’t without blame here as well, but they tend to keep this a bit less visible. And equally they can use their own technological merits and use cases. I never intended to label any of the Pivotal crew as aggresive, but being aware of how a certain opinion (or sharing someone else’s opinion) can be perceived negatively is equally as important as the opinion itself. Something I learned now as well. In the end, we’re all tech guys, not marketing experts.