The Spring vs Java EE discussions have started up again recently, primarily triggered by a Gartner report entitled "Market Guide for Application Platforms". The report wasn’t sponsored by Pivotal (as far as I know you can’t sponsor Gartner reports) but you can download it from the Pivotal website. You can also download it from other vendors, for example here’s a copy from Lightbend (the company behind Scala, Play & Lagom) [1].
These days, as much as possible, I try to avoid getting pulled into the Spring vs Java EE debates. I think they’re mostly counter productive and there’s really very little to be gained by rehashing old arguments. I also like working with the Java EE community. I want Spring to run well in application servers, I want to take certain specs used in Java EE and use them directly from Spring, and I have a lot of empathy for other open source developers. I certainly think there’s more to be gained by working together than there is by arguing with each other.
Other than a few tweets, I’ve pretty much been ignoring this latest set of arguments and counter arguments to focus on actual work. The other day however, as part of a Twitter discussion, I read this:
"Phil should come up with a blog entry that says he doesn’t agree with Pivotal sponsored content. Somehow doubt it will happen."
I assume the content in question here is the Gartner report (even though it’s not sponsored), and here’s the problem I have. Whilst I certainly don’t agree with all of the report (The line "Java EE is not an appropriate framework for building cloud-native applications" is particularly problematic), I do think certain points are valid. As with everything in tech, there are no black and white outcomes, everything is a shade of gray. Even if it means upsetting some of the Java EE community, I need to be honest about the part of the report that I do agree with, and that’s that a shift from traditional application servers will happen.
Now before anyone gets too upset, I’m not saying that application servers aren’t wanted, I just think they’re going to get hard to sell in isolation. At one point, it may have made some sense to deploy multiple WARs in a single application server. If memory is expensive then why not try to share the resource? If your application server takes a while to start up, then why not keep it running and swap out only the application WARs? The problem is that the forces that drove these decisions are no longer there. In the days of cheap infrastructure, VMs and containers, application isolation is more important. With modern application server startup times, why not just cold start? With elastic infrastructure, why setup a cluster? I can’t see any real benefit in deploying multiple WARs in the same application server, and I can see lots of downsides.
So what about those vendors selling expensive application servers? What are they going to do? I think the answer is they are going to sell you a platform. A platform that really doesn’t care what type of application you push to it (as long as it’s designed for the cloud). Spring, Java EE, Ruby, Node, Go, .NET, C, PHP, whatever you want! In this world the application server is either going to become part of the platform, or it’s going to become part of your build. Sure, platform vendors are going to try to differentiate themselves with the depth of support they offer. Red Hat are going to lever their investment in JBoss, Pivotal are going to position themselves as the best place to run Spring, and Lightbend are going to be the platform for Akka and Play. I also think there’s going to be a host of vendors that’ll be happy to support whatever mix of platform and technologies you happen to have.
So what does this mean for the Spring vs Java EE debates? Well, it’s impossible to control a community, so I doubt they are going to go away entirely, but I do think they’ll be less intense. Do you run an application server in Docker? Or is your stack an embedded Tomcat running on Cloud Foundry? Who cares! You can run whatever makes sense for you and vendors are going to do their best to support you. Like small WAR files and a set of standards APIs, use Java EE. Want to choose from a curated set of dependencies and create a fat JAR, use Spring Boot. Hate the entire idea of a framework, go ahead and write raw socket code. The only thing I hope is that you support the companies that support the open source.
If your only complaint as a developer is you prefer one type of free open source technology stack over another type of free open source technology stack, it really doesn’t sound like things are so bad!
Great post. Thank you.