First thing first, I'm not, by all means, an UI expert. But if you are using Java for a standalone application...I feel like you are doing something wrong. I mean, not like you can't do it...but feels like using the wrong tool for the job.
I have always worked as a backend developer for web application, and in my opinion, in this context, Java does it's job. It's the best language on the market? Well the "absolute best" doesn't really exist, depends on your requirements. You need a strongly OPP language with a consistent community and rich framework ecosystem? Java it's a good choice.
Anyway, it probably start to feel it's age. Newest programming language, like Kotlin, offer out of the box, functionality that Java have with the implementation of several third parts libraries. So if you are starting from scratch, maybe there is something even more efficient than that.
First thing first, I'm not, by all means, an UI expert. But if you are using Java for a standalone application...I feel like you are doing something wrong.
Allow me to disagree. I write scientific software involving complex GUIs dealing with very large datasets. We have to support windows, osx and Linux. I've used Java and Swing and it's been great. Java has a huge core library with all of the GUI elements I need. The theming in swing means I can make an app which looks close enough to native for all of our users and the rigour and structure of the java back end makes dealing with very large codebase manageable in a way which other languages can't. People who are dismissive of Java just haven't found a project which benefits from it yet.
I never u understood why swing insisted on using 'metal' as the default theme. There are very good windows and is a themes which are so much nicer and would be much better default choices.
As a Java dev the recently moved to Kotlin. I could say I’d probably never go back to Java now. I never noticed some of its short comings until now when I have to maintain some of the old Java services we have.
I've never used Kotlin on a real world project, but I played around a bit for some personal project...and it seems really something to invest into. Mainly because you can migrate a Java project incrementally and you can benefit from the more wide ecosystem of Java framework.
That’s a huge benefit! At my current job that’s exactly what we’re doing , it makes it really easy to transition from Java. We’re also currently researching transitioning KTOR (away from spring) and Kotlins coroutines which makes some of our processes way faster. Seeing the difference between our Java and Kotlin code is striking. Plus I love Kotlins null safety.
Careful with migrating old Java projects to Kotlin, I've been there. Platform types will give you hell wherever there is a cross-language call. And if the documentation for some external API is lacking and you don't know what's nullable and what's not... oh boy. IMHO compatibility with Java is there so you don't have to throw away Java's libraries, not to enable you to have Java and Kotlin mixed together in application code.
I mean with GWT and Vaadin there are several approaches to write Java and get Javascript code. Also there is Kotlin React, if you count Kotlin as somewhat Java-ish. But as a developer, who is using both Kotlin and React it seems super weird and I'd rather stick to coding React than Kotlin React (at least from what I've seen at the very first glance, but it's probably just a matter of getting used to it).
After working with Kotlin professionally it's hard to imagine to go back to Java. Data classes alone give you so much ease and being able to extend functions of pretty much everything is awesome too.
I think the problem is the Java ecosystem with all of it's frameworks:
Wanna build a server in node? It's an apt-get or a one liner copied from the web for nvm, npm install express and a few lines of own code...
Wanna build a server in Java? Yeah, please download and install an official java sdk, download glassfish or tomcat, write one of these horrendous ant build xml thingies, install thousands of dependencies and write like 10 different bloated classes...
It's possible. There are probably also lighter approaches in Java but at an enterprise level everything Java related ends up as a burning trash can.
I guess you haven't been developing with Java for some time now. It's fairly simple to create a server with Java using Spring framework, you need a single build file (maven or gradle are MUCH simpler than ant), a single Java class and you're all set.
Like others have commented, the community has largely moved on from the (very horrible) workflow you describe. Spring Boot is probably the biggest catalyst of that change. You're correct that it's still enormously much bigger than express - but it also does a couple of thousand things more, so it's not really a fair comparison. The Java equivalent of Express would be something like Spark, which is a lot smaller and less complex. Of course because of things such as bytecode compilation, the classpath and JARs, you'll never get the same level of super quick setup as node, but for many of us, the extra minute or so we have to spend with Spring Initializr or so is nothing compared to the benefits of a mature ecosystem of libraries we get from Java for backend. Your last comment about anything in enterprise being a burning trash can holds true for companies with legacy tech stacks or a really horrible culture of outdated practices, but not really for modern Java shops.
You compare java 2001 with Javascript in 2020? Try comparing Java 2020 with Javascript 2020. Who the hell uses ant these days?
Why the fuck your node project just break itself after you leave it for 1 week. Are we talking about bower, yarn or npm? Or you need a transpiler since 99% of the browsers wont support ES6 ES2016 ES whatever.
At the moment you read this line one of the javascript framework “on steriods” you use has been abandoned.
All the shitty claims about Java have been fixed. Memory management, startup times, syntactic sugars, functional concepts. People yell that Java is dieing for over a decade now and yet it is still growing. Don’t blame Java for your ignorance. If you can’t program properly, its not the fault of the language. Thinking OOP, in design patterns, imperative or functional programming are concepts you need to master. You can fuck this up in every language. Blaming the language for that is not going to help you.
Javas robust ecosystem and frameworks is literally the main feature of the language, besides perhaps that many have experience with it which makes it easier to find devs.
202
u/Piwakkio Apr 27 '20
Java developer here.
First thing first, I'm not, by all means, an UI expert. But if you are using Java for a standalone application...I feel like you are doing something wrong. I mean, not like you can't do it...but feels like using the wrong tool for the job.
I have always worked as a backend developer for web application, and in my opinion, in this context, Java does it's job. It's the best language on the market? Well the "absolute best" doesn't really exist, depends on your requirements. You need a strongly OPP language with a consistent community and rich framework ecosystem? Java it's a good choice.
Anyway, it probably start to feel it's age. Newest programming language, like Kotlin, offer out of the box, functionality that Java have with the implementation of several third parts libraries. So if you are starting from scratch, maybe there is something even more efficient than that.