The UI Toolkit I Want

Working with JavaScript and HTML has reminded me that I haven’t seen a UI toolkit that I’ve liked. I’ve seen and used ones that I thought were done well, and that I didn’t mind using, but there has always been a mismatch between the way UIs seem to be assembled and what I want to do.

Some background: I’ve used Qt extensively (mostly 4.x, but some 5.x as well), HTML (3.x through 5 and XHTML), Tcl/Tk, and very small quantities of GTK+ and Interface Builder. None of them do what I want.

I’ve enjoyed my time using Qt overall; it accomplishes what it set out to do, and manages to make C++ less painful at the same time. Qt5 and QML are pretty cool, and I have a few ideas I want to try out with them, but that said they are pretty “conventional”, in that they basically want to help you put pixels in a pattern on a screen.

My experience with Tk have been a mixed bag. Though I (really) like the ability to design the UI in real time from the REPL, the UIs tend to be pretty out of place on every platform, and again it’s still just trying to solve the problem in a way I don’t want.

GTK+, well, the less said about it the better. Pretty much the only thing it has going for it is that it’s designed to be used from C. That said, actually using it is an uncomfortable mix of arcane and downright inexplicable in practice (or at least in my experience, clearly some people can write UIs in it, but I am not one of them).

Interface Builder, well, I didn’t spend much time with it, but it was fine. Boring, even, which is probably a good thing for what it’s setting out to do. Again, though, it approaches the problem in a way I don’t want.

Honestly, HTML5 comes closest to what I want to do, or at least it will in the near future. With custom elements, the HTML on an “app” page can be clear, concise, and cover the intent of the page rather than necessarily covering the implementation. That said, though, you wind up in JS to do some really ugly things, so that kinda evens out. Oh, and the less said about platform-specific behavior, the better.

So what do I want? I want a toolkit where I can describe my intent for the UI in a simple, flat manner and have the platform make a sensible UI out of it. I don’t want to worry about Mac vs Windows vs Gnome vs KDE vs Android vs whatever, I just want to say “this is what my UI should do, make it happen”. Because honestly? I don’t care where the pixels go the vast majority of the time. I have an application with 1 to n primary modes, each with a focal (usually standard) widget and some associated actions. I don’t care how the pixels line up, as long as they fit for the platform and don’t look completely idiotic.

In my mind, this is a simple text file with sections for the different modes, where each mode has the focal element(s) listed with their actions, and each element lists the backend bit to hook up to. Hell, do this right and you could completely supersede X11 and the web at the same time (history repeating itself and all) with a format that doesn’t suck.

Now, granted not all applications can get by using just standard widgets, so for the <20% of programs that need more, you’d have the ability to extend the set of widgets available a-la NeWS (though probably not through PostScript). In this system, you’d provide your module with a globally unique name (reverse-DNS maybe), and then others could use it if they choose.

Do this right, and you could probably even get command-line interfaces out of the same description format for free. Honestly, I don’t know why this doesn’t already exist. It should, because most people shouldn’t be making UIs, and I think most of them would agree.

Yet another project I might have a go at sometime, ‘cuz I don’t already have a large enough pile of those…