Skip to content

Instantly share code, notes, and snippets.

@philwebb
Last active March 15, 2019 15:43
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save philwebb/b0ebfd4fc7c5c519d82361b8e9744fa4 to your computer and use it in GitHub Desktop.
Save philwebb/b0ebfd4fc7c5c519d82361b8e9744fa4 to your computer and use it in GitHub Desktop.

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!

@chkal
Copy link

chkal commented Apr 9, 2017

Great post. Thank you.

@OndroMih
Copy link

OndroMih commented Apr 9, 2017

I like it. It's no longer Spring vs. JavaEE, but Spring, JavaEE and many other frameworks/platforms in the modern ecosystem. Java EE and Spring have more in common than many think - they compete together with other JVM and non-JVM options, have deep Java heritage, well-thought API and, in the end, many common APIs based on the JCP process.

@OndroMih
Copy link

OndroMih commented Apr 9, 2017

I just wonder why Pivotal or Lightbend want email address for a free link to the report...
Here is the direct link to Gartner's report: https://www.gartner.com/doc/reprints?id=1-3N8E378&ct=161205&st=sb

@jmcshane
Copy link

jmcshane commented Apr 9, 2017

This is spot on. The application server doesn't make any difference, what matters is the platform. I think the vendor reaction you talk about is already coming into focus with IBMs emphasis on the BlueMix platform over WebSphere.

@logicfox
Copy link

logicfox commented Apr 9, 2017

I agree with your views entirely. And things will only become more interesting when more platforms roll out serverless compute features like Amazon Lambda, truly abstracting away the server, or even containers.

@mrts
Copy link

mrts commented Apr 9, 2017

Note that there is also WildFly Swarm, "Spring Boot for Java EE", that let's you hand-pick just the dependencies you need for your Java EE app and get a standalone fat JAR.

@siruslan
Copy link

siruslan commented Apr 9, 2017

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.
Both JavaEE and Spring bring value to the ecosystem. We learn from success and mistakes of each other. But we should respect the experience of each other and should not force only one opinion. Diversity is the key for faster innovations.

@m-reza-rahman
Copy link

m-reza-rahman commented Apr 9, 2017

I must say this write-up very pleasantly surprises me. Do I agree with all of it and think there are no perspectives/nuances still missing? No, but it is not nearly as important as the opportunity for long overdue reconciliation this overall message can and should be the beginnings of.

A sincere thank you. Enough said.

@dhoffi
Copy link

dhoffi commented Apr 10, 2017

love the last sentence!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment