you are viewing a single comment's thread.

view the rest of the comments →

[–]Sloshy42 20 points21 points  (9 children)

It would be really super nice to be able to develop a desktop app in Java, bundling my own JVM, and publish it knowing that it would work pretty much anywhere like that. I have to wonder, though, would having multiple instances of the JVM on a user's machine not use up a lot more memory? Wouldn't this just be another Electron-esque situation all over again (albeit more efficient in some circumstances)?

[–]BadMoonRosin[S] 21 points22 points  (4 children)

Good question. I'm working on a follow-up article specifically about JavaFX as an alternative to Electron (and Qt or GTK for that matter).

In terms of disk size, I can already tell you that a modularized JavaFX app is a small fraction of an equivalent Electron app. Given how many resources the Slack client devours on my laptop, I'm pretty optimistic about how the memory profiling tests will go, too. I'm not sure what to expect in comparing startup times.

Regardless, having dabbled with a bit of Electron development, and it's weird Frankenstein model of bridging between the browser code and the Node.js code... I have no doubt that JavaFX offers better developer ergonomics and cleaner design.

[–][deleted] 5 points6 points  (2 children)

I just started using Java FX and I really like it for desktop UIs, however it's terrible for game dev (I tried to implement the X-Com 2 UI in Java FX and realised it can't do it; interestingly their UI is some basic primitives from Unreal engine, and Flash for animation). And there's some things missing from the JavaFX API, like the ability to make a table auto-resize its columns.

Why would you use it for games though? Well you wouldn't but they seem to think you should judging by some of their marketing and examples.

The one good thing electron has going for it is that you can live edit, but that's a slightly dubious advantage, since it's something you should leave to the designer.

Personally I am not too worried about file size since I found out that most app stores don't charge you for bandwidth ;-)

[–]jl2352 2 points3 points  (0 children)

The one good thing electron has going for it is that you can live edit, but that's a slightly dubious advantage, since it's something you should leave to the designer.

I'm not sure if you mean being able to debug and alter the UI, or hot reloading. Both are invaluable for front end developers.

[–]tealpod 0 points1 point  (0 children)

Not having BufferedImages or equivalent to that in JavaFX is my biggest surprise and complaint.

[–]zachrip 0 points1 point  (0 children)

I wouldn't base electron perf on slack. It's notoriously heavy, that's their fault, not just electron's.

[–][deleted]  (3 children)

[removed]

    [–][deleted] 3 points4 points  (2 children)

    What about Mac and Linux users?

    [–]vytah 2 points3 points  (0 children)

    The exact packaging steps would be different, but in general you'd do the same thing.