August 24th, 2024

Clojure Desktop UI Framework

Humble UI is a Clojure-based desktop UI framework designed for cross-platform application development, featuring a user-friendly API, ongoing development, and resources like a Slack community and sample applications.

Read original articleLink Icon
FrustrationSkepticismHope
Clojure Desktop UI Framework

Humble UI is a desktop UI framework specifically designed for Clojure, aiming to facilitate the development of high-quality desktop applications without the use of Electron or JavaScript. The framework focuses on leveraging JVM and native code to build better cross-platform applications while enhancing development speed. It addresses the limitations of existing solutions, such as Electron, by providing a native-like experience across different operating systems. Key features include a declarative UI API that is user-friendly and compatible with functional programming, as well as both low-level and high-level APIs that offer flexibility for developers. Humble UI utilizes Skia for GPU-accelerated graphics and JWM for OS integration, ensuring performance. Currently, the project is still in development, with ongoing changes and no official documentation available. Resources for users include a Slack community, blog posts discussing the framework, and sample applications to explore. Developers can run the REPL server and reload demo applications using specific commands. An example code snippet demonstrates how to create a simple UI with Humble UI, showcasing its ease of use.

- Humble UI is designed for Clojure to create desktop applications without Electron or JavaScript.

- The framework aims to improve cross-platform application development and speed.

- It features a declarative UI API and both low-level and high-level APIs for flexibility.

- The project is still in progress, lacking official documentation.

- Resources include a Slack community and sample applications for exploration.

AI: What people are saying
The comments on the Humble UI article reflect a mix of opinions and concerns regarding the framework's design and usability.
  • Some users express disappointment that the framework aims for a "web look" rather than a native desktop experience.
  • Concerns are raised about the readability and complexity of Clojure code, especially for those accustomed to imperative programming.
  • There is a call for better documentation, including API links, to help users evaluate the framework.
  • Discussion around the perception of native vs. non-native app aesthetics, with some questioning the necessity of native looks for certain applications.
  • Users express hope for the project's success, drawing comparisons to other successful Clojure GUI projects.
Link Icon 14 comments
By @kpw94 - about 2 months
I'm sure Clojure is a great language for some tasks...

But, looking at the examples (picked the Wordle one since I know that game): https://github.com/HumbleUI/HumbleUI/blob/main/dev/examples/...

I find it extremely hard to read. Even small snippets, say line 56 to 74 which define this "color", "merge-colors" and "colors"... then the "field" one lines 76 to 117 is even harder.

is it more natural read for people familiar with writing functional programs? (am I permanently "broken" due to my familiarity with imperative programing?)

I wonder what the same Wordle example would look like in, say pure Flutter.

Also wonder how would that code look with external dependencies (say hitting a server to get the word of the day), and navigation (with maintaining state in between those pages)

By @dig1 - about 2 months
Clojure and Flatlaf [1] tick all the boxes for me. If I want declarative-ish UI, I can always throw in Seesaw [2]. Everything else I find cumbersome, pulls tons of unnecessary dependencies and (usually) ends up abandoned in a year or two. With Swing, I know it is well-documented and will work for the next 30 years. But YMMV and I'm hoping that HumbleUI could be an exception.

[1] https://www.formdev.com/flatlaf/

[2] https://github.com/clj-commons/seesaw

By @layer8 - about 2 months
The readme says it is aiming for a “web look”, with no intention to make it look — and, presumably, behave — native. As a user, that’s not what I expect and hope for from a desktop application.
By @roenxi - about 2 months
Really could use a link to the API docs in the README.md, it is a bit hard to judge when the "documentation" such as they have so far is sparse. But it is nice to see a newish UI project.

I will say I've found Clojure to be a success story for doing GUI work. Projects like Dave Ray's seesaw (https://github.com/clj-commons/seesaw) are an amazing demo of how one man can rearchitect an API like Swing into something that is deceptively fun to use. High hopes that this project goes somewhere that is similarly enjoyable.

By @michaelsbradley - about 2 months
Cljfx is also worth a look!

https://github.com/cljfx/cljfx

By @rlkf - about 2 months
I found this dimension of the analysis:

> People prefer native apps to web apps

> Java has “UI curse”: Looked bad

to be at odds with this aspect of the design:

> No goal to look native

> Leverage Skia

By @zombiwoof - about 2 months
I love this. Clojure will be perfect for this.

Per the other comment, might do less dunking

By @hyperhello - about 2 months
Question about native integration. Does the framework support documents on a native level? Can I define a file type that opens the app when double clicked, maintaining the windows and data, etc?
By @Dansvidania - about 2 months
Does anyone close to the project know when/if it will no longer be in "No docs, and everything changes every day" release status?
By @cess11 - about 2 months
What does it bring that https://github.com/cljfx/cljfx does not?
By @BaculumMeumEst - about 2 months
If only Clojure wasn't tied to the fucking JVM
By @dzonga - about 2 months
where did the myth that people prefer apps that look native to the platform come from?

There are two types of apps: 1. the ones that professionals use and 2. the ones that consumers use.

for 1. they don't care if it looks native, as long as it works and is performant e.g. DAWs, Video Editing tools, Trading, etc.

2. likewise I don't think it matters that much.

my guess is the myth came from OS makers.

By @webprofusion - about 2 months
Lol, checking out the readme. Dunking on stuff isn't what makes you an opinionated framework.