Live data from Hacker News

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

sites.google.com

121–130 of 143 posts

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

#121
post #17
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…

>But not nearly as bloated as many of the competing Java and C++ applications. I too like discord and VSCode, but VSCode uses far more resources than sublime, with the tradeoff being that it's more easily extensible and has a faster release cycle(which may or may not be related to team size). VIM locally is obviously also going to be much faster and capable of opening far larger files than VSCode.

I haven't tried using sublime as a full IDE, so I'm not comparing against sublime.

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

#122
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.

I suspect it would be more responsive using Macvim/Gvim. I suspect the terminal emulator adds some keypress latency.

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

#123
post #47
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…

One thing that can make vim in a terminal feel slow is related to the escape character doing double duty to signal extra information to terminal applications (e.g. arrow keys or window size) on the same channel as regular input. To catch a single press of the escape key, vim needs to wait a little bit to make sure it's not the start of an escape sequence. Sometimes that delay is configured too generous and becomes no…

Hmm. I'll have to look at this closer. If it's adjustable, that might greatly improve the responsiveness.

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

#124

Earlier quoted context omitted.

> I just want a full-featured (i.e. not QML) what are you missing with QML ?

In my case, I needed to subclass QWidget to get native handles and do native things to embed Chromium (via CEF). There might be more, but it seemed appropriate to use QtWidgets from the start for my use case.

I guess you have your reasons... but why not use the "official" way to embed chromium in Qt (QtWebengine) instead ? This would work both in widgets and qml.

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

#125
post #17

Earlier quoted context omitted.

>But not nearly as bloated as many of the competing Java and C++ applications. I too like discord and VSCode, but VSCode uses far more resources than sublime, with the tradeoff being that it's more easily extensible and has a faster release cycle(which may or may not be related to team size). VIM locally is obviously also going to be much faster and capable of opening far larger files than VSCode.

I haven't tried using sublime as a full IDE, so I'm not comparing against sublime.

Ahh, that's fair. If you're looking for something quick, and don't need the bleeding edge stuff like the language server, then sublime is very nice.

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

#126

Earlier quoted context omitted.

Thats a totally valid opinion but its just that: an opinion. Personally I find Java overly verbose and bloated. I'd use it if it was the right too for the job though. Just depends on what you are doing.

> Personally I find Java overly verbose and bloated Not much more verbose than it needs to be explicit. "Explicit is better than implicit." PEP 20, Zen of Python

I mean, I guess? Again we are talking about preferences here. I think being explicit has less to do with the language and more to do with the developer writing it. Poorly or well written code is universal and all offer you the tools to shoot yourself in the foot or vice versa.

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

#127

Earlier quoted context omitted.

> 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.

As a language both are insane in parts. Not just architecture but the muddle of tooling also.

Agree. Any language that's been around long enough is like that though. PHP is a good example. I've heard it called a hammer with no blunt end and 2 claws. You _can_ turn it on its side and hammer in the nail but... why? Lol. That said projects like Laravel show that you can write easy to use and, dare I say, beautiful code with it. Its just a matter of who is driving.

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

#128

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…

Please don't use Qt if you want to target platforms other than Linux and make your applications accessible to blind users. [1] Electron is OK on Windows, but I've heard it's not currently accessible on Linux. Don't know about Mac.

[1]: https://blind.guru/qta11y.html

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

#129
post #74

Earlier quoted context omitted.

IntelliJ faster than VS Code? I don’t think anyone who’s used both products could make such a claim with a straight face. I joke with my coworkers that I know they’ve fired up IDEA because I can hear it. Whenever it’s on, their fans are dialed up to full blast.

I'm gonna make such a claim with a straight face. I don't know if it's VSCode's vim emulation or what, but on every platform I've tried it on IntelliJ beats it, while VSCode is busy catching up to where my cursor is still after chaining like 2 vim commands.

VSCode's vim plugin is pretty awful performance wise (I should know, I use it every day).

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

#130

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…

As someone who has written desktop JavaFX apps and web apps, I don't think you know what you're talking about. I can tell because you talked about the web's "fantastic tooling and iteration speed". That's a bit of a giveaway - I'm willing to bet you've never written a JavaFX app in your life. JavaFX apps work just fine on Linux. Not even fine, they work well. I know because I've written them and tested them on Linux.…

I'd also add that JS + Swing apps on top of Nashorn/Rhino also work really well.
Post reply on HN