What is it with Windows programming and baroque, massively redundant systems?
At my previous job, I observed with some interest that people who came from the Unix camp tended to write and design simple, direct, and elegant systems. Windows people, on the other hand, seemed to love convoluted designs, full of indirection and multiple layers of interfaces. I guess this correllates with the nature of programming on each system. Unix programming is a hodge-podge of different libraries, but there is usually only one library for any given domain — as functionality was added, the APIs were bolted on to the side of the existing libraries. There’s the C & C++ standard libraries for basic stuff, Berkeley Sockets for networking, etc. Admittedly, there are half a dozen GUI libraries (Motif, GTK, Qt, etc.), but they are orthoganal to each other; they aren’t lovingly intertangled like an octopus orgy.
In Windows, on the other hand, we find layers upon layers of interfaces all to accomplish the exact same things. For your basic user interface, there’s the original 16-bit API, the Win32 API, MFC and now Windows Forms, each one calling the one below, until the call stack of a given function in your code is hundreds of functions deep. For interprocess communication, there’s DDE, OLE, COM, DCOM, ATL, Web Services, SOAP, etc. Most of the code I’m looking at these days uses half a dozen different memory management libraries, string libraries and collection type libraries in any given file.
This irks me, because that style of doing things infects designers and makes them write the same way. I’m working on an MMC snap-in, a simple tree of nodes with associated property pages. Each node is a COM object that inherits certain interfaces by means of which to handle events, etc. But this designer has built a base class for all the nodes in this snap-in which handles the COM events, and then passes them on with a second set of virtual functions to the individual node objects. This is a completely redundant and useless layer that makes the code harder to understand and maintain, as well as slower and more and more inefficient.
Since the Mac interfaces I have seen (and worked with, but that was 12 years ago) also have this characteristic, I would guess it comes from UI centric designs. The test case would be Gnome, if it doesn’t have this style, then it might be related to proprietary vs open source. If others can’t see the code, you need to give them lots hooks and plugins.
Once the pattern is set of course it grows out of control.
I can’t speak to Gnome, but the KDE folks tend to keep things leaner and meaner, I think, by refactoring wherever possible. The version 3 API’s are simply different from version 2, and apps need to be ported.
Microsoft saw backwards compatibility as the most important feature keeping companies using their software (no need to rebuild in-house applications). With XP SP2 they have made an exception for security. :)
See http://blogs.msdn.com/oldnewthing for the insane lengths they will go to.
-Rod