I've migrated my app to JBR 25, using Kotlin 2.3.0...
# compose-desktop
u
I've migrated my app to JBR 25, using Kotlin 2.3.0 beta2 for compatibility with JVM Toolchain 25. I've enabled Compact Object Headers, and while I haven't measured it, I'm definitely noticing a significant performance improvement! I'm really looking forward to the day when JEP 514 and 515 can be easily supported with the Compose plugin. Thanks, JetBrains!
❤️ 2
m
From looking at the current state of these JEPs I am just not convinced that the JDK team still has desktop applications in their focus 😢.
@Michael Paus Yes, obviously, Oracle doesn't care, but JetBrains is working on it!
k
Desktop apps haven't been a JDK focus in the last 15 years now.
The font rendering on macOS is broken since 2019 - for the default OS fonts that have switched to variable typography back then. JBR has multiple fixes just for that, and even after multiple queries in 2019-2021, those fixes still are not in the baseline JDK distro.
u
I think the situation could change; I need to write an article about it, but I've really thought about it, and I think Compose Desktop is the best desktop framework across all platforms.
k
Don't hold too much hope for things changing with the core AWT / Java2D / Swing. Look at the last couple of years at https://mail.openjdk.org/pipermail/client-libs-dev/ - it's just endless refactoring of the same tests, moving bits around in the packages, and similar things. Nothing of real substance is happening - no new controls in 15 years, no desktop integration (launcher shortcuts, tray icons, embedded title panes, etc), no proper support for variable typography, no media playback, no web view, etc. Some decent things are happening in the JavaFX land, but that is sort of a side project supported by a few enthusiasts.
u
you are wrong, jetbrains gets rid of awt
k
I am not talking about what JB is doing
u
Yes, I agree that Oracle no longer places any importance on the desktop, but JetBrains places a lot of importance on it, and even in the current state of things, I am convinced that it is the best desktop framework.
Think about it — what else is there? Electron? If you’re building a desktop app, it’s for something serious, not an offline website. Which other declarative framework lets you write your UI and your logic in the same language — and not just any language, but the most elegant one? Take Tauri: it’s a webview, so the UI is in TypeScript, which won’t be very performant, and the backend is in Rust. Take Flutter: there’s no real desktop ecosystem, and if you want to do anything outside of what Flutter provides, you have to rely on native bridges. Neither Electron nor Tauri allow you to share code with mobile platforms. So for me, the choice is obvious. The JVM is a truly powerful platform, Kotlin is the most beautiful language, Compose is the best way to write a UI, the Java ecosystem is huge, and once warmed up, the JVM offers performance comparable to languages like C++, but without the complexity that comes with them.
👍🏻 1
👍 1
k
One way is to see it from the perspective of "how does this make my job as a developer nicer". Another way is to see it from the perspective of "how does this make it easier for me to reach my users". In the last decade+, the users are voting overwhelmingly in favor of the web as a ubiquitous, lowest friction distribution vehicle. The beauty of the language, the various nice things about the UI toolkit, and other things that you mentioned are all secondary to that. I don't think many developers argue that Javascript is the best language out there. And yet it is used every day to reach so many users across so many devices. If your goal is to satisfy your own personal "itch" to develop, that's one thing. But if your goal is to reach your users and to grow your business, that's a whole different thing. Not speaking for JB here in any capacity, but their users are very much OK with using desktop software. The toolbox app is a very nice delivery vehicle for that. It's sort of a mini app store for JB apps. But even that is a couple of steps more than what the web has to offer in terms of friction.
u
I don’t really understand the connection with the discussion. I’m talking about desktop frameworks, not about whether the web will attract more users than a desktop app. And that actually comes back to what I said: if you’re developing a desktop application, it’s not to build an offline website (electron) — it’s because you need to build something a website simply can’t do. And in that area, Compose Desktop is the best.
m
@אליהו הדס Just a little side question: Can you tell me which exact version of the JBR 25 you downloaded and how you configured it for packaging your desktop app? It seems I am having some problems with picking the right one and doing the configuration in the build.gradle.kts properly.
u
@Michael Paus You can check my app https://github.com/kdroidFilter/Zayit
it' s in hebrew but for the build config it's ok 🙂
✡️ 1
m
Ah, that's what I was looking for but where did you find that https://cache-redirector.jetbrains.com/intellij-jbr link? I must have always been looking in the wrong places because I couldn't find a JBR SDK 25.
u
m
Oh dear. That is the place where I was looking but there are so many links that I had to hit the "read more" button in order to see them all. I somehow must have missed that 🤔.
Just built and tested an Apple notarized installer of my software built with JBR 25, Kotlin 2.3.0 beta2 and Compact Object Headers and everything seems to work. Thanks for the hint.
👍 1
u
@Michael Paus Have you also noticed an improvement in performance?
m
To be honest, no. Maybe it would be noticeable on a much slower machine but on my MacBook Pro M4 the overall performance is and was more than good before and after the switch.