Live data from Hacker News

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

sites.google.com

131–140 of 143 posts

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

#131

Earlier quoted context omitted.

Are you running stock or loaded with plugins ?

Stock Android IntelliJ, VSCode with a few plugins(Vim bindings mostly).

Android "yes, you gave me 2 GB RAM for Gradle for building a 10 MB APK, but I'd still like more" Studio.

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

#132

Earlier quoted context omitted.

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

> Then you have the language creep (Typescript, Dart or anything to paliate JS deficiencies; LESS/SASS), the JS framework creep, the libraries decay, etc. That is totally a thing in Java too. Languages: Groovy, Kotlin, Scala. Framework: GWT, Spring, Struts, Vaadin, Grails. Libraries decay: commons, apache, different parsers, different db drivers. On top of that though, you need to think about your JVM? What dependenc…

> That is totally a thing in Java too.

I think you are confusing the JVM with Java. However, comparing languages needed for web development to available JVM languages is comparing apples-to-oranges. With web development you have to use different languages in the same app to accomplish anything. In a app you are using the JVM for you can pick one language and stick with it.

> Then figure stuff out like facets.

A "facet" has absolutely nothing to do with Java. The term "facet" is a term used by IntelliJ to configure adding features to your project. IntelliJ configures all of these on its own, I never even have to think about them (it actually took me a bit to even figure out what you meant by "facet").

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

#133
post #120

Earlier quoted context omitted.

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…

> I bundled the JRE with my app so the users did not need to have Java installed. Side note here: do you track security vulnerabilities of the shipped JRE and provide updates when it happens? Too often, I've seen java applications shipping obsolete and vulnerable JRE. And in some cases, I've seen not consistent versions across a product line. Also wasn't there some unknowns about the right to redistribute the Oracle…

> Also wasn't there some unknowns about the right to redistribute the Oracle JRE?

Nope, Oracle clearly says you can in their FAQ:

https://java.com/en/download/faq/distribution.xml

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

#134
post #56
post #40

Earlier quoted context omitted.

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

In my project, the jar file itself is 20MB, and the resulting files generated by javapackager are: 55MB (.exe), 90MB (.dmg), and 67MB (.deb), all of which include the jar file inside them. These are not the total file size after installation, though.

Was this using the "javapackager" tool? This seems to have been introduced in Java 1.7 as far as I can tell.

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

#135
post #56

Earlier quoted context omitted.

In my project, the jar file itself is 20MB, and the resulting files generated by javapackager are: 55MB (.exe), 90MB (.dmg), and 67MB (.deb), all of which include the jar file inside them. These are not the total file size after installation, though.

Was this using the "javapackager" tool? This seems to have been introduced in Java 1.7 as far as I can tell.

Yes, I mentioned javapackager in the comment.

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

#136
post #135

Earlier quoted context omitted.

Was this using the "javapackager" tool? This seems to have been introduced in Java 1.7 as far as I can tell.

Yes, I mentioned javapackager in the comment.

Hmm, indeed it does, but I could have swore that the first time I read the comment it didn't. I guess I forgot how to read earlier :-)

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

#137
post #62

Earlier quoted context omitted.

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?

You're right that with Electron that's not an issue as you control the browser. I was comparing the equivalent issue in web dev to the "write once run anywhere" issue in Java. If you pick the users operating system e.g. only support Windows then of course, there are no cross platform issues with Java either

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

#138
post #120

Earlier quoted context omitted.

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…

> I bundled the JRE with my app so the users did not need to have Java installed. Side note here: do you track security vulnerabilities of the shipped JRE and provide updates when it happens? Too often, I've seen java applications shipping obsolete and vulnerable JRE. And in some cases, I've seen not consistent versions across a product line. Also wasn't there some unknowns about the right to redistribute the Oracle…

I do track those. I didn't need to update my app at any point for them because most vulnerabilities in the JRE are to do with sandbox escapes and my app did not run potentially malicious code.

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

#139

Earlier quoted context omitted.

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…

> It's better than it once was, but you're going to have to check every single feature of HTML5 you use to figure out which browsers implement it There's tools for that and i'm pretty sure just writing plain html and css or some compile-to-js would have shaved off significant time from that 8 month full dev time.

It wouldn't have been possible to do as a webapp at all, as the app in question was a peer to peer app that spoke a fairly complex network protocol that doesn't support WebSockets (Bitcoin). But even if that issue hadn't existed, the development time went mostly on logic and p2p/networking issues. HTML wouldn't have helped and JavaFX supports a dialect of CSS2 anyway.

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

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

IntelliJ is slow to start up (though I've no idea why that would matter for an IDE). And when indexing and building it can be very demanding on machine resources.

But I've never found it slow in any respect that matters for doing actual work. For everything that matters (opening files, project-wide search/replace, refactoring, typing latency, looking up docs, code navigation etc) it's easily competitive with lightweight editors.

Post reply on HN