Live data from Hacker News

Say no to Electron: use JavaFX to write a fast, responsive desktop app

sites.google.com

1–10 of 143 posts

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#2
> That's a world of difference from an Electron app, which typically needs 200MB just to open.

This is sort of an unfair comparison - the JavaFX one is mainly smaller because it doesn't include the distribution of Java and all the libraries, which is if I recall correctly about 200 MB, while Electron commonly includes all libraries and the renderer. I will give you that the Java distribution can at least be shared by many applications, but you can definitely get into some nasty versioning situations with that.

On the other hand, if you were to compare this with say a Qt application, it'd be about ~20MB all in, ~10MB if UPX'd, no external dependencies needed. Or just the size of your tiny executable if you're working on a Linux distro that ships those deps already.

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#4
post #2

> That's a world of difference from an Electron app, which typically needs 200MB just to open. This is sort of an unfair comparison - the JavaFX one is mainly smaller because it doesn't include the distribution of Java and all the libraries, which is if I recall correctly about 200 MB, while Electron commonly includes all libraries and the renderer. I will give you that the Java distribution can at least be shared by…

Not to mention that the JVM (via JRE I think?) needs to be packaged with your desktop Mac app if you want to deploy on the App Store.

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#6
As much as I dislike the inherent complexity of Electron, VSCode and Discord are existence proofs that it can be used effectively.

VSCode is far faster than any other IDE I've used, and even beats VIM in terminal in terms of responsiveness (altough I suspect this is not VIM's fault).

Discord is overall a great application, and quite responsive.

Both are slightly bloated in terms of memory, from what I supect they could be. But not nearly as bloated as many of the competing Java and C++ applications.

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#7
"you can distribute it to any user on any OS and it will just work."

I had to check the date on this article to see if it was from 2007 or something. Under no circumstances does java "just work", its an insane mess of java shipped with the os, being updated, and people not updating due to oracle trying to force feed crapware as part of their installers/updaters. I, for one, do not live in a world that resembles anything like java jars "just working".

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#8

There's not really an acceptable amount of arguments against Qt and Gtk+ to support the headline. It reads like, "I don't really know much about the alternatives other than JavaFX, but this is why I personally like it..."

To me, on a sliding scale of complexity, JavaFx is closer to Electron than Qt and GTK+ (especially since your options are C++, or using bindings that have varying quality and ease of use).

If I was trying to sell someone who uses Electron on an alternative it'd definitely be JavaFx, maybe Qt with QML if they knew C++.

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#9
post #5

I'm a little disappointed that the article doesnt mention the benefits of JavaFX and why exactly I should ditch electron over javafx.

The author touches on app size and performance - both of which are fairly valid I believe, but they don't go into why JavaFX over other desktop UI frameworks.

Re: Say no to Electron: use JavaFX to write a fast, responsive desktop app

#10

"you can distribute it to any user on any OS and it will just work." I had to check the date on this article to see if it was from 2007 or something. Under no circumstances does java "just work", its an insane mess of java shipped with the os, being updated, and people not updating due to oracle trying to force feed crapware as part of their installers/updaters. I, for one, do not live in a world that resembles anyth…

Yeah, try getting any Java program to work on a Chrome box.
Post reply on HN