3 ms·
They're pretty big. I've got a fairly basic JavaFX app that's compiled with Graal, and it weighs in at 98MB, or 32MB when zipped.
by ipsi 3y ago
They're pretty big. I've got a fairly basic JavaFX app that's compiled with Graal, and it weighs in at 98MB, or 32MB when zipped.
- Alupis 3y agoNobody is going to blink at a 98MB program being installed...
- ezst 3y agoNot too surprised, but aren't you incidentally also bundling chrome/WebKit on top of that by depending on WebView?
- mike_hearn 3y agoJavaFX supports a WebKit based WebView widget, but it's optional. If you don't use it it's not bundled. If you do then you pay the cost of including the WebKit build which is ~80mb. In practice the need for WebKit is going down over time. For basic rich text you can render Markdown to JavaFX nodes directly, for more advanced stuff you could transform [X]HTML to FXML, you don't need it for video or audio, there's a native rich text / word processor control these days, and if you can do 3D graphics with a high level scene graph (meshes, lights etc) then you don't need HTML for 3D either. Still, it's often useful and bandwidth/disk space isn't the problem it once was.
- ezst 3y agoAre you the Mike Hearn from the bitcoin and "history is a scam" fame? Cool to see you here :) I somehow am (positively!) surprised to see your name in relation to Java GUI frameworks. Hydraulic Conveyor looks interesting, is it planned to support GraalVM's native-image? Would it work with Scala/ScalaFX?
- mike_hearn 3y agoHaha, it's amusing that the history essays are one of the things you remember :) Yes I think you can compile Scala and ScalaFX apps down to native binaries this way. Look at Gluon Substrate: https://github.com/gluonhq/substrate https://github.com/gluonhq/substrate One of our customers is experimenting with shipping such apps with Conveyor. There's a discussion ongoing here: https://github.com/hydraulic-software/conveyor/discussions/66 https://github.com/hydraulic-software/conveyor/discussions/6... We got a console hello world working, albeit the DX is a bit rough. You need some ugly config boilerplate and some additional Native Image json files. But, it works, at least enough to create a Mac package with the regular Conveyor feature set. There are some limits though. I think the WebView doesn't work when the app is natively compiled this way. There's also someone in our Discord who has been trying it with Compose apps. If it all starts working well it could be quite interesting for desktop app development, as suddenly you could use high level languages and portable UI toolkits but with the sort of startup time, performance and memory usage you'd expect from native apps (modulo binary size which is still quite large). If you want to use HTML as the UI then you can use the Chromium Embedding Framework, which would give you an Electron-like experience but with many more available languages: https://hydraulic.dev/blog/13-deploying-apps-with-jcef.html https://hydraulic.dev/blog/13-deploying-apps-with-jcef.html For a Slack competitor like Linen it would make more sense to use web UI because of the video calling/WebRTC stuff. OTOH if you don't care about that, it'd be (imo) easier and more direct to not use HTML. Proper GUI toolkits give you a lot of stuff out of the box like virtualized list views which HTML still doesn't; useful for scrolling over huge datasets like chat logs. I've been using JVM GUI for years for various tasks. It was appropriate for Bitcoin tasks because it's immune to injection attacks, because you can run everything locally with P2P protocols like the original Bitcoin app did, it's portable etc. Also I learned GUI programming decades ago and find classical UI toolkit concepts like VBox, HBox, StackPane, TableView etc more intuitive than HTML.
- ezst 3y agoThanks for the reply, I'll definitely keep an eye on all that. > For a Slack competitor like Linen it would make more sense to use web UI because of the video calling/WebRTC stuff. I'm not even sure it matters so much, for instance there is this XMPP client that uses (lib)WebRTC for audio/video calls and has all of its UI build with Gtk (no web): https://dino.im/ https://dino.im/ > Proper GUI toolkits give you a lot of stuff out of the box […] Also I learned GUI programming decades ago and find classical UI toolkit more intuitive than HTML. yep, looks like we are on the same boat of angry old men yelling at clouds :)