Hacker News new | ask | show | jobs
by KronisLV 1547 days ago
IDE: IntelliJ IDEA https://www.jetbrains.com/idea/

Nothing else seems to come close, they have a Community version, nowadays Eclipse and NetBeans both feel slow but Visual Studio Code with Java plugins lacks refactoring abilities one might expect in an IDE for non-trivial projects. Also, if you get the Ultimate package of their tools, you get all sorts of other useful tools, personally i also enjoy WebStorm and DataGrip for developing front end stuff and working with databases in a separate tool.

JDK: whatever the LTS release of JDK is at the time, based on the kind of work that i do (so JDK 17 now) https://adoptium.net/

As long as you're not stuck with JDK 8, you should be fine in regards to this. But you can definitely enjoy some speed improvements across the releases as well as new language features as well as things like helpful NullPointerException messages. Personally, i'd sometimes also look towards OpenJ9 as an alternate runtime (due to lower memory usage), but that project's future isn't very clear (at least in regards to available container images) last i checked.

As for frameworks, pick one of the following:

  - Spring Boot: mainstay of the Java ecosystem, has a really large amount of integrations and the Boot version also simplifies getting up and running, about as safe of a bet as Rails for Ruby or Django for Python
  - Dropwizard: probably the closest competitor to Spring Boot in my eyes, but is a more loose collection of a variety of pretty much "standard" libraries, has decent developer experience
  - Eclipse Vert.X: pick this if you want to work with reactive programming, last i checked it didn't feel quite feature complete, but the performance numbers speak for themselves, even if it feels a bit niche
  - Quarkus: another modern option that's tailored for the development of performant web services, got a lot of hype in conferences in the past few years
  - Helidon: pretty similar to Quarkus as far as i'm aware (at least as far as the positioning in the market goes) so figured i'd also mention it
In practice, you're most likely to see Spring Boot in existing projects since it's so boring and dependable, though perhaps sometimes you'll also run into the legacy Spring framework (which can be a pain to deal with) or even some of the other ones.

Here's a rough performance comparison if you care about that sort of stuff: https://www.techempower.com/benchmarks/#section=data-r20&hw=...

Build tools: personally, i just use whatever Docker images to base the apps on when available and something like Ansible when not. For the actual toolchain, Maven is still pretty dependable, i guess Gradle is also okay. You might occasionally run into tools like Bazel or Jib, experiences there might vary.

App servers: if you need an application server for some reason (e.g. deploy app as .war), Tomcat is still a good option. If you need the EE functionality (e.g. Java EE which is now Jakarta Java), you might need to reach for something like TomEE or Payara Server, though i haven't needed to do that for a few years at this point, since Spring Boot embeds Tomcat and that is good enough for almost all projects.

1 comments

> Nothing else seems to come close, they have a Community version, nowadays Eclipse and NetBeans both feel slow

After not using Eclipse for 10 years, I had to use it again last month for a very large existing project. I was pleasantly surprised. It felt faster than IntelliJ.

Huh, that is pretty nice to hear! I'll probably need to download it sometime and try it out again.

I last did 1-2 years ago and it still wasn't quite passable in a Java project with 4000-5000 source files, though maybe that's because of the plugins involved (e.g. myBatis for ORM which has Java interfaces and XML mappers for SQL queries) or mixing technologies like JSP/JSF and also having JS files with front end resources in the same codebase.

Of course, i'm talking about the full Eclipse with the JDT package and a bunch of other stuff, some folks have more slim installs: https://www.eclipse.org/jdt/ In that regard you can indeed have a lot of flexibility. Oh and i think that a while ago they also tried having lightweight solutions like Che and Theia as well.

Recently i've actually started splitting up the old legacy projects into multiple monorepos (e.g. "back-end" and "front-end" folders with the occasional supporting service in there as well, not necessarily everything in a single repo) and the impact has been pretty noticeable!

For starters, separate instances of IntelliJ and WebStorm for different kinds of code (Java and JavaScript/TypeScript) seem to work far more quickly, the builds also are generated faster (since fewer resources to copy) and i don't need to cry when i forget to tell the IDE to ignore node_modules.

The Eclipse incremental compiler is faster than IntelliJ on any decently sized project. Something like 20-60 times faster for us (<1s vs. 20-60s).

I think the UI of IntelliJ is snappier, so for small projects that leads to people saying it's "fast".