Over the last week or so, I’ve been working on a test program for Project X. The requirements pretty much dictated a GUI solution, but while I work primarily under Linux, the other developer on it works primarily in Windows, and we use both C++ and Lisp for this project. Any programmer who’s tried to write GUI programs for more than one platform knows that while all GUIs look pretty much the same, and do almost exactly the same things, the programming interfaces are completely different.
That’s rather ridiculous, when you think about it. If you develop a program for one OS, even in a mostly-portable language like C++, you have to all but rewrite the interface code to get it to run under a different OS — just to get the same general look! Microsoft and Apple have a vested interest in making it difficult for people to port programs to other platforms, so it makes some sense that they wouldn’t go out of their way to simplify it. But open-source people don’t, and they’ve come up with a solution: a package called wxWidgets.
Not only does wxWidgets bridge the GUI interface gap in a way that’s portable, it does so in a way that’s accessible from nearly any programming language! The Lisp interface for wxWidgets (wxcl) wouldn’t compile cleanly for me under Linux, but I suspect that will be fairly easy for me to fix when I need it. The C++ interface worked with no problem, and in maybe ten hours of work (with no prior experience with it) I’ve managed to build all the GUI code for the test program, for both Linux and Windows.
“But wait, there’s more!” The wxWindows solution also covers other areas of cross-platform pain: a standard graphics format (XPM), file and stream handling, multiple (human) language programs, multithreading, database access classes, Internet and TCP/IP classes, multimedia classes, embedded web browsers, and more — all source-code portable between different OSes. And it’s cleaner than MFC or any other Windows programming framework I’ve used — and I’ve used a lot of them, and even written a couple of my own. It’s… elegant. That’s the only word I can use to describe it.
This is the way programming is supposed to be.
Between this kind of thing, the rise of web-based programs, and the recently-mentioned Unity feature of the upcoming VMware Workstation, the OS is becoming less and less relevant. And that’s a good thing… for everyone except Apple and Microsoft, at least. 