unclebob / more-speech

A Nostr browser in Clojure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage of Compose for Desktop instead of Swing

sherviiin opened this issue · comments

Just cloned the project, and I'm wondering what if we use Compose for Desktop for UI.
By doing that we won't need to solve Swing related problems. In my point of view, we will face less problems, and development of the UI part will be more pleasant due to better preview tooling supported by Compose, and also it is way more readable.
If that is desirable for you, I would be more than happy to work on this.

I'm not an expert on Desktop JVM libraries, so it's hard to me to see benefits. But out of curiosity Compose don't have any Clojure wrapper like Seesaw or cljfx. Is this a big inconvenience? I'm new to Clojure but I liked API in cljfx that is more declarative and functional than seesaw. I guess giving architecture of this app today there is some work to support both frameworks if someone is committed to maintain GUI in his beloved library and just have flag to which GUI default to.

Is Compose for Kotlin? I wonder how compatible Clojure and Kotlin are, since they are both JVM languages. I'd love to move to something better than Swing; the non-functional stateful stuff in Swing is killing me. So to speak.

Is Compose for Kotlin? I wonder how compatible Clojure and Kotlin are, since they are both JVM languages. I'd love to move to something better than Swing; the non-functional stateful stuff in Swing is killing me. So to speak.

Jetbrain's Compose is indeed for Kotlin, not to be mistaken with Android's Jetpack Compose.
IMO Swing needs to go. Compose is just my recommendation.
I will create a proof of concept for this, and if you were onboard with it, we can plan next steps.

Roger. I shall await your result.

What about JavaFX? It's not functional, but IMO has a more modern design and also has support for mobile.

Update: I googled around a little for Clojure JavaFX libraries and this one seems the most popular/modern/supported:
https://github.com/cljfx/cljfx

I'll look it over. I'm getting pretty frustrated with swing/seesaw.