think I finally figured out why GUI programming feels so annoying: it's because all these libraries use builder-style APIs instead of declarative markup

I hate writing this:

vbox = Vbox()
lblTitle = Label()
lblTitle.setLabel('Hello World')
vbox.add(lblTitle)

but this would be fine:

<vbox>
<label>Hello World</label>
</vbox>

@joe_no_body I transitioned this year from writing some Java UI code to writing it in JavaScript and HTML, and it was night-and-bloody-day. It's not *quite* "definitely tool for the job" (let's be honest: the *real* tool for the job of writing a GUI is a GUI toolkit), but it's really, really up there.

I've seen some Java toolkits that try to approximate the benefits of HTML / JavaScript by having you write the layout using XML, but in practice that seems more trouble than it's worth often because Java is so *terribly* verbose in terms of writing the binding logic. If I have XML but the tags are named `com.me.foo.ugh.killme.MyClass`, I have failed.

@mtomczak yeah, I know a lot of people dislike the use of HTML and JS for everything, but comparing the web ecosystem with the desktop ecosystem side by side, it's not hard to see why so many people go with the web (or Electron/NW.js/React Native/etc.)

which, of course, creates a vicious cycle, because so much work has gone into making the web nicer to develop for that people just default to it, so there's not as much motivation to build better/more usable desktop GUI tools in the first place

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.