I have a little programming experience and I did get to work with Swing (Java) and wxPython. Some years ago, I ended up having to port an app I did to OS X and all the problems I've had with wxPython just multiplied. I've started looking at alternatives and I could not find anything better than wxPython. QT was the only one that came even close. GTK was hell on Windows (last time I checked).
I don't think my predicament is unique, some other people might have reached the same position over the years.
So, why isn't there a GUI toolkit to have the following characteristics:
- Simple. Basic windows/dialogs (nati开发者_如何转开发ve open and save) + a basic set of widgets with SOLID Layout management. Additional (composite widgets) implemented as additional libraries.
- Actively maintained on OS X, Linux and Windows
- Actively maintained bindings to at least 3 high level languages.
- Actively maintained documentation for best practices GUI devel with examples using the toolkit. MVC/MVP properly explained. GUI HIG (Apple style) simply explained, complete with semantics, paradigms, best practices, alignment, proper spacing and TONS of best of their kind examples from successful pieces of software.
- A simple way of building a distributable executable for the 3 targeted platforms in each of the languages.
- Implemented as close to the metal using readily available libs like Clutter, cairo, etc.
Are these requirements too much to ask? If yes, why?
Help me understand why isn't there such a tiny lib available?
Have you tried Qt
? It is a cross platform C++
GUI toolkit for higher level language (PyQt
). And it seemed very simple to me.
What you ask is a simple lib with enormous flexibility. Be able to build 3 * 3 executables, having good documentation and using other libraries all with a different background. And all of that on different OS platforms. It is quite a challenge it think QT would com the closest but it does not meet all your criteria.
SWT? You can use it from Java, Python (well, Jython), Ruby (well, JRuby), Groovy, LISP (well, Clojure), and anything else that runs on the JVM.
It's simple-ish, it uses native widgets under the hood, it's actively maintained, and because you're distributing either a JAR or a JAR and some interpretable code, there's a unified build process. I can comment on its documentation, nor its proximity to any sort of metal.
I recognize that this is probably not the answer you were looking for.
My guess is that windows developers couldn't be bothered as they have wpf etc and linux developers couldn't be bothered as they are used to it. So only people who are sick of win developement and moving to linux would embrace it. Maybe its time for you to start an open source project :) I was thinking something like wpf but based on opengl would be a good start.
The Tk toolkit meets most of your requirements, except maybe for number four. It's very cross-platform, uses native widgets when possible, is easy to use, etc. The requirement for distribution is hard to meet because that depends on the language, but when used with tcl, you can use tclkits and starkits which are an absolutely fantastic way to distribute code (essentially, your single-file executable has an embedded virtual file system that can contain all your assets -- code, images, etc).
For more on the cross language, cross-platform features of tk see http://www.tkdocs.com
WXWidgets seems a good fit as well.
精彩评论