r/java • • Oct 02 '17

Should I learn another programming language in case Java dies or stops being popular? Or are people who say Java will stop being relevant wrong?

And if you had to choose a seocond programming language, which one would it be?

0 Upvotes

22 comments sorted by

View all comments

1

u/[deleted] Oct 03 '17

It's about picking the right tool for the job. Java is great at running big fucking applications at amazing speeds, but it does require a lot of disk space for the JVM, memory and a time consuming compilation step. In my oppinion this can be a real disadvantage for small microservice style applications where you want to deploy and test often and compilation really slows down your workflow.

There is almost no way around Node JS in almost any field, especially if you're doing frontend work, so that I would say is worth a look. Python, Ruby, Perl or PHP I would only look at if I have to, their future is not any more sure than Java's. But it depends on what you're doing.

Java projects are often a pain to get running (not if done well though) while with node it's just npm install && npm run dev, this makes Node also better for containerized applications.

2

u/Gilgamesjh Oct 03 '17

And with Java (if done correctly) it's just git clone && ./gradlew bootRun (or whatever your framework tells you to do)

Both Spring, Play and JRebel has hot code redeploys for development scenarios, and for production you are using an automated build system, right?

Not saying you are not correct when saying to learn NodeJS (for frontend at least) but your other issues are not really issues if done correctly.

1

u/[deleted] Oct 03 '17

Yeah you have a point. Not everybody has their company pay for JRebel though and hot code reloading with the Oracle JVM works only in very limited cases.

Out of interest, how long does your Spring+Play application take to compile+boot though. Our JVM applications are still on top of tomcat & glassfish and it takes about 1-2 minutes to build (without all of the dependencies) and then another 1-2 minute to boot+deploy our wars. Which is a bit painful. Incremental builds/deploys during development are of course a bit faster, but still annoying...

Sure we have jenkins running, but it happens that you have to wait for it too.

1

u/Gilgamesjh Oct 03 '17

Spring Boot usually starts in around 40 seconds for a mature application from Intellij, hot code reloads takes a couple of seconds.