unclebob / more-speech

A Nostr browser in Clojure.
MIT License
297 stars 33 forks source link

Usage of Compose for Desktop instead of Swing #16

Open sherviiin opened 2 years ago

sherviiin commented 2 years ago

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.

galuszkak commented 2 years ago

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.

unclebob commented 2 years ago

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.

sherviiin commented 2 years ago

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.

unclebob commented 2 years ago

Roger. I shall await your result.

msgilligan commented 1 year ago

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

unclebob commented 1 year ago

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