Live data from Hacker News

The decline and fall of Java on the desktop

jdeploy.substack.com

221–230 of 362 posts

Re: The decline and fall of Java on the desktop

#221
post #180

Earlier quoted context omitted.

Have you by chance had any experience with using Kotlin with JavaFX/OpenJFX? I've never been much of a fan of Java, but have had a fair amount of exposure to Kotlin via Android development and have found it fairly pleasant to work with, so if it meshes well with OpenJFX that may appeal to me as an option for cross-platform desktop dev.

I love kotlin and have messed around with javafx + kotlin. It works well once you have set it up.

Do you mean TornadoFX, or some other kind of JavaFX-with-Kotlin?

Re: The decline and fall of Java on the desktop

#222
post #54

Earlier quoted context omitted.

Basically, every growth figure of the language shows otherwise. Oracle is ain’t saints, but the amount of needless bashing it gets here is astonishing. Regardless of what its other branches are doing, Oracle managed to do one of the smoothest language takeovers where the (stellar) core team is virtually unchanged, the language became completely open sourced and it underwent tremendous changes which resulted in huge g…

> but the amount of needless bashing it gets here is astonishing I don't think it's needless. I'll bash Java as long as it's the language for AP computer science. Imagine a budding young programmer, bright eyed and bushy tailed, eager to get into computer science. They get to class and greet the teacher "Welcome class, let's learn about Java. There's a wide world of computers out there, but your perception of computi…

We switched to Python at my school.

Not sure how I feel about Python (or Java) as a first language. Something a bit lower like C would be a better foundation, IMO.

Re: The decline and fall of Java on the desktop

#223
post #93

Earlier quoted context omitted.

Haven't used Lombox, RxJava is great, but it just feel like bandaids on a language that wasn't really designed for it. There's no accounting for taste, but I'll take either Scala or Clojure on the JVM any day of the week. Scala's monads don't feel like a library feature, they feel baked into the language...because they are.

Lombok is indeed a band-aid that replaces IDE-autogenerated code, which in turn is a band-aid for language design choices on the one hand (e.g. equals and hashcode), and accepted Best Practices in Java world like setters/getters everywhere; for the latter, you can either do public final fields, just use public fields until you need an accessor method (java's refactorings are great), or on the other hand add language…

Why use Lombok if you can use Groovy + CompileStatic? Does lombok do anything groovy can't do?

Re: The decline and fall of Java on the desktop

#224
post #92

Earlier quoted context omitted.

Oracle certainly wasn't good for Java. But Java-on-the-desktop had been struggling for years before that. You either bundled a complete JVM with your application (fine if you're making a 500MB IDE, not so good for anything smaller) or you had the embarrassment of directing your users to an installer that bundled the Ask toolbar. They might even end up with the security-hole-riddled java browser plugin. And even once…

In fact Oracle saved Java. Sun was struggling and Java was stagnant at the time. There was hardly any big innovation in the last years under (the) Sun. Java Modules started in the Sun age, but they didn't get it out of the door. J2EE / Java EE was also kind of dozed off. So, while Oracle is for sure not the most sympathetic company, it is good at execution.

Google or IBM would have been better tjam Oracle. This seems like a false choice: Oracle or nothing.

Back when Java/Sun were up for grabs:

1) Google by far (they were less evil back then, I think). I mean, they would have saved money and headaches and probably a lot of distracting management meetings.

2) IBM, well ok: they did Eclipse, had their own JDK, and a lot of enterprise customers on locked platforms that could financially support the language and platform and were decent contributors to Linux.

... ....

3) Really? Oracle?

It's a miracle Oracle didn't completely kill Java.

Re: The decline and fall of Java on the desktop

#225
post #176
post #38

Earlier quoted context omitted.

I had to use OpenJFX for school recently, and while I still hate the Java language, I had to begrudgingly admit that JavaFX really wasn't that bad at all. It more or less did what I wanted it to do, the resulting GUI didn't look too bad, and it performed well enough. I ended up using it for a Clojure app a bit later. It's good enough to where I think that if JavaFX had come out around the same time as Swing, the Java…

In Clojure you can use JavaFX through cljfx https://github.com/cljfx/cljfx/ I haven't used React, but I think it's very similar. You have a state atom and then a datastructure that represents the GUI and associated callbacks that modify the atom. So it ends up feeling very functional. It doesn't use hiccup, but it's a similar structure. I've got to say it was fantastic. The least painful GUI programming I've ever don…

I’ve found cljfx very productive. Steep learning curve, and the abstractions are somewhat leaky, but it’s worth the pain around the edges for the core workflow. Wrapping controls like ControlsFX is trivial. We’ve written a wrapper for TestFX as well so we have full functional tests and everything gets built, tested, jlinked and jpackaged continuously. It’s been one of the least painful projects I’ve ever worked on tbh.

Re: The decline and fall of Java on the desktop

#226
post #71

What happened in the years leading up to 2005, or perhaps in 2005 specifically that caused this blackout? Where did all of the Java desktop developers go? Before 2004, there was a much wider perception that web applications were fundamentally limited by their latency, and if you wanted a really rich, interactive user experience, like Winamp or Outlook, you had to make a desktop application. Then Gmail launched in 200…

Google Maps was the first widespread use of Ajax outside Microsoft, and its near-realtime interactivity blew people away. Prior to that, few developers believed this level of interactivity was possible. After Google Maps, everybody learned Ajax and a thousand interactive flowers bloomed.

Re: The decline and fall of Java on the desktop

#227
post #54

Earlier quoted context omitted.

Basically, every growth figure of the language shows otherwise. Oracle is ain’t saints, but the amount of needless bashing it gets here is astonishing. Regardless of what its other branches are doing, Oracle managed to do one of the smoothest language takeovers where the (stellar) core team is virtually unchanged, the language became completely open sourced and it underwent tremendous changes which resulted in huge g…

> but the amount of needless bashing it gets here is astonishing I don't think it's needless. I'll bash Java as long as it's the language for AP computer science. Imagine a budding young programmer, bright eyed and bushy tailed, eager to get into computer science. They get to class and greet the teacher "Welcome class, let's learn about Java. There's a wide world of computers out there, but your perception of computi…

There are books like "Java in Two Semesters: Featuring JavaFX" [0], which appears in the series "Texts in Computer Science"! Now, that series used to be called "Graduate Texts in Computer Science", until they dropped the Graduate to allow for books like these, I guess. And even "Undergraduate" would have been an oversell. Actually, "Computer Science" still is.

[0]: https://link.springer.com/book/10.1007/978-3-319-99420-8

Re: The decline and fall of Java on the desktop

#228
post #201
post #153

Earlier quoted context omitted.

That’s the fault of jetbrains, not java. They release it with way too old JRE with custom patches and quite shitty default arguments, while it works eons better with no argument at all on an up-to-date jdk, but even more so with the single setting of a low-latency GC, ZGC. The JVM is a beast, why do you think a good deal of all serious web applications run on top of it?

> The JVM is a beast, why do you think a good deal of all serious web applications run on top of it? The JVM sacrifices latency for throughput, which is good for servers but not for desktops.

Look at ZGC GC. It has less latency due to stop-the-words than what the OS scheduler causes. (Of course at the price of throughput). But also the default GC, while on default being more throughput preferring can be tuned by a single paramater.

Re: The decline and fall of Java on the desktop

#230

Successfully using JavaFX (or OpenJFX as it is now called) in a mission-critical cross-platform app with 50k+ installs. It’s not that bad really. Package size and RAM usage is a bit of an issue, as we bundle it with a jlink’ed (stripped down to what is needed, thanks to Java 9 modules) JDK. Other options like Electron or native Windows/macOS wrappers around a shared core written in C++ were discussed but ultimately d…

I'm working on a personal project at the moment that uses a shared C++ core across Android and iOS. (It's an image processing plugin for Unity, no GUI, so cross platform frameworks aren't suitable). It was complicated to setup, but I'm glad I did. Only having to write 99% of the code once is a life saver.
Post reply on HN