HACKER Q&A
📣 sriram_malhar

Do you find the Java enterprise ecosystem complex?


I find the entire edifice of Java Spring Boot all the way down to gradle extraordinarily complex. Does it really have to be this complex? What's the simplest API framework out there that doesn't require one to read multiple books to put together a simple internal app.


  👤 mindcrime Accepted Answer ✓
Java EE and Spring Boot are two different things, so I'm a little confused about what you're getting at. Historically Java EE (eg, Enterprise Java Beans and all of their accoutrements) was considered very complex, and Spring was the "simpler, easier" alternative.

There's no question that as the scope of Spring grew things got somewhat more complex, but honestly, I still find Spring Boot and Spring based Java web apps fairly simple. You write Controllers and use a few annotations to define the context path, urls to individual endpoints, inputs/outputs of the various endpoints, etc. All those things have to be defined somewhere no matter what platform you use, no?

The only part I find maybe just a touch annoying is the Spring Data JPA stuff. It's not conceptually difficult, and truth be told the CrudRepository stuff makes it dead simple to make basic repository instances. But the configuration is just fiddly/tedious enough to be ever so slightly off-putting. But even on that, you can create a project once with all of that setup, save it off to the side as a template, and just copy that anytime you need it in the future (this is, in fact, exactly what I do).

I dunno... all in all, Spring Boot seems mostly fine to me. Grails is arguably a little bit simpler but that's still just Spring Boot with some syntactic sugar layered on top to handle the common cases.


👤 brunoborges
There are several minimalistic frameworks out there for building microservices in Java:

    - SparkJava
    - Javalin
    - Ninja Framework
    - Dropwizard
    - Rapidoid
Other frameworks that are less "minimalistic" but cover a much wider range of use cases and come with several built-in integrations are:

    - Quarkus
    - Micronaut
    - Spring Boot
And these are frameworks for building the core bits of your back-end systems. For front-end, if you are into component-based web frameworks, I highly suggest:

    - Apache Wicket
    - Vaadin
If you are not into component-based, then:

    - Thymeleaf
    - Qute
Now, you may conclude "boy, this only proves my point that the Java ecosystem is "extraordinarily complex". But you can also read this as "extraordinarily successful", given that most of these frameworks are 5 to 10+ years old, very stable, mature, and still kicking with great community support.

👤 sto_hristo
Try Node, if you're into JS, gets you off pretty fast.

When i first started learning Java EE (actual EE, not Spring), it did feel overwhelming. It is objectively complex. The learning curve is steep and intimidating, but so is anything else when you first start with it. What i later found out was that anxiety was all due to not knowing how the different parts tie together. In time, i got an idea of the purpose of the different APIs and how they are supposed to work together. This means that i didn't have to learn in details all aspects of the framework. You delve deep just in the part you need.

And i just read the docs (official ones, not 3rd party books), skim through sections to get a feel for it. In time, it will all start making sense to you. When you get to actual work, you'll know where to dig in for the details. This worked out great for me when i started on Spring projects as well. And at the end, i found that that the most difficult part was to overcome the anxiety of it all...

Will this approach work for you? Don't know, it's not a math formula.