Live data from Hacker News

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

sites.google.com

61–70 of 143 posts

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

#61
Suppose a startup has a runway of 6 months and a full stack web dev who can build the backend and web frontend.

Are they going to fragment the code-base with Java to introduce a desktop client? Are they going to hire another enterprise Java dev, who most likely isn't familiar with the rest of the stack?

The rise of Electron is fundamentally driven by the cost effectiveness of the wide availability of developers and community support.

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

#62

"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…

It does just work, at least compared to web apps. I have experience of both web dev and distributing a somewhat complex JavaFX app to consumers. I bundled the JRE with my app so the users did not need to have Java installed. The leaks in the operating system abstraction Java gives you are really quite small. I wrote my entire app on macOS and tested on Linux/Windows only right at the end - after about 8 months of ful…

> you're going to have to check every single feature of HTML5 you use ... you will spend more far time working around browser specific issues than you will spend dealing with OS specific issues in Java.

I'm confused at this comparison in terms of Electron. Do you have to worry about any of that when doing an Electron app? Or were you making a comparison between JavaFX and web dev?

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

#64

Don't say no to Electron just yet. And if you do, jesus, there's better alternatives than JavaFX (use Qt). You know what Electron has brought us? It's brought the Linux desktop reliable feature parity with other platforms. Fat chance Visual Studio Code (often hailed as "one of the best-optimized electron apps") would have existed on Linux without Electron. Discord, another fantastic Electron app, is functionally iden…

> And if you do, jesus, there's better alternatives than JavaFX (use Qt). Because "god forbid" anyone use technologies associated with java? FUD at its finest. > Fat chance Visual Studio Code (often hailed as "one of the best-optimized electron apps") would have existed on Linux without Electron. I just use IntelliJ IDEA. It's ten times faster and ten times more powerful than Visual Studio Code. And it's written with…

This is surprising, I've never seen anyone say that IDEA is faster than VSC. In my experience it's _vastly_ slower.

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

#65
post #40

Earlier quoted context omitted.

Javafx includes a packager tool which creates a native application with the runtime bundled inside. There is nothing to install.

Once the runtime is bundled in, what does the size of the standalone application come in at? Curious if it is close that of a bare Electron app (around 50-90 MB, depending on the platform).

Yes in Java 8 it's comparable. In 9 it should be smaller due to some dead code elimination on module boundaries, but 9 just came out so it's a bit early for people to have experience with it yet.

Note that even in 8 you can do a DCE pass over the code and erase files you know you won't need from the JRE image by hand. I did this and shrank the size of the download by about half. The JavaScript world calls this "tree shaking", you can use ProGuard to do it in Java but it's a bit fiddly to set up.

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

#66

Don't say no to Electron just yet. And if you do, jesus, there's better alternatives than JavaFX (use Qt). You know what Electron has brought us? It's brought the Linux desktop reliable feature parity with other platforms. Fat chance Visual Studio Code (often hailed as "one of the best-optimized electron apps") would have existed on Linux without Electron. Discord, another fantastic Electron app, is functionally iden…

> Electron has given desktop developers access to the web's fantastic tooling

There must be irony here. The web development plateform is easy to get in, but hard to master: too many languages are involved (html, css, server side, javascript) and most didn’t have some really useful features until very recently (css grid for instance).

Then you have the language creep (Typescript, Dart or anything to paliate JS deficiencies; LESS/SASS), the JS framework creep, the libraries decay, etc.

I failed to see how this is ‘fantastic’ in regards to a language such as C#/F# that allow you to build desktop app very easily. If multiplatform support is not a requirment, the desktop languages and tooling are way ahead in term a ease of use.

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

#67

Ugh this just reads like an old Java developer pissed off at people not using his tool of choice. His snide remark about JavaScript just tells me that he has an outdated view of the language. JS is weird yes. JS has problems yes. But the author is promoting friggin JAVA as the alternative?? Phfft! There are reasons to pick your tools. Sometimes speed of development and being able to use your pool of developers existi…

> JS is weird yes. JS has problems yes. But the author is promoting friggin JAVA as the alternative?

As a language, I find java is much better designed than Java Script.

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

#68

Earlier quoted context omitted.

> And if you do, jesus, there's better alternatives than JavaFX (use Qt). Because "god forbid" anyone use technologies associated with java? FUD at its finest. > Fat chance Visual Studio Code (often hailed as "one of the best-optimized electron apps") would have existed on Linux without Electron. I just use IntelliJ IDEA. It's ten times faster and ten times more powerful than Visual Studio Code. And it's written with…

This is surprising, I've never seen anyone say that IDEA is faster than VSC. In my experience it's _vastly_ slower.

There's something wrong in that case.

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

#69
post #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 cou…

If an Electron app is beating vim in responsiveness on your machine, I suspect there's something wrong with your machine. Vim should react instantly in every case. I have yet to see that from any Electron app I use.

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

#70

Don't say no to Electron just yet. And if you do, jesus, there's better alternatives than JavaFX (use Qt). You know what Electron has brought us? It's brought the Linux desktop reliable feature parity with other platforms. Fat chance Visual Studio Code (often hailed as "one of the best-optimized electron apps") would have existed on Linux without Electron. Discord, another fantastic Electron app, is functionally iden…

> And if you do, jesus, there's better alternatives than JavaFX (use Qt). Because "god forbid" anyone use technologies associated with java? FUD at its finest. > Fat chance Visual Studio Code (often hailed as "one of the best-optimized electron apps") would have existed on Linux without Electron. I just use IntelliJ IDEA. It's ten times faster and ten times more powerful than Visual Studio Code. And it's written with…

As someone who spends all day in IntelliJ there's no way it's 10x as fast, hell for me it's flipped the other direction.

VSCode is easily 10x faster than IntelliJ. If I'm writing Java I'll happily use IntelliJ but anything else it's VSCode or vim.

Post reply on HN