Thoughts on UI frameworks
Once I started digging around in QT I realized that there were some controls that I’d need to extend, like the QTreeWidget, which weren’t exposed in the Node-QT API. I’d have to first extend the API for this widget and then dig in and write some C++ to create my custom version of it.
This got me thinking that while it is nice to have dynamic language bindings for a well-defined native library, I don’t think the paradigm works that well for all domains. If you need to parse XML, pretty much any task you can think of can be performed using the fixed API of something like libxml2. You probably won’t find yourself wanting to extend the library to do anything specific, you’d do that in the client code. Same thing with libpcre or something like that.
UI frameworks seem to be a whole different animal. You are lucky if you can get away with just using some standard buttons and input boxes, but for any nontrivial app, I’ve found that you are going to need probably one custom control in order to make the app UI seem polished.
Most (all?) UI frameworks allow the extension/composition/creation of its controls or widgets. Sometimes there is a control that is close enough to what you want that you can subclass it, but many times you end up drawing it yourself using some combination of a low-level drawing API (GDI+ anyone?) and image files.
Further, there is the issue of which UI framework to use. Cross platform development and native look-and-feel are at odds with one another, and some cross-platform frameworks (Swing comes to mind) just wrap the native UI elements for the platform. This is good for getting the app to look like a native app on a platform, but unfortunately it represents kind of an uncanny valley of look-and-feel. Yes, it uses native widgets, but something just seems a little bit off.
Taking things further, we might want to think about mobile devices. QT and WXWidgets are available on mobile devices also, and probably many others. Each mobile platform also has a native set of widgets. How do you decide which way to go with the UI?
I’m not too sure about this yet. I think I’m going to abandon the idea of using any native UI toolkit for my outliner experiment.