Another release out of the door, and some time to put my thoughts in writing.
Did Microsoft lose the API war?
The title of this post is of course referring to the famous “HowMicrosoft Lost the API War” by Joel. I kept going back to that article when we were porting our product to Vista, as well as trying some of my personal projects on Vista. The more I think about it, The Raymond Chen Camp in Microsoft is still strong, and the API war is far from lost. And this article does not indent to pick on Joel, it just uses his article (which was very true in 2004) as a base to make a point.
- Speculations in the article that Win32 will be replaced by WinFX or Avalon or whatever did not happen. Win32 is still there, still working fine. All the previous code I have tried worked seamlessly on Vista.
- I still have not found a user application that worked on XP and does not work well on Vista (drivers and hardware – completely other story).
- It took us about 2-3 weeks to get a product (involving a lot of complex kernel-mode drivers and system service) that worked on XP to work on Vista. As a comparison Panther to Tiger took six months. So Microsoft did really make it seamless to port even system software. User-mode software did not need any porting.
Who makes the best APIs?
Also, apart from not losing backward compatibility, Microsoft are still kings at making their APIs developer-friendly.
Example – you want you application to make an HTTP request and get the result. Both Apple and Microsoft have an API (Apple calls its CFNetwork, MS calls theirs WinINet) for that. Ok, so you write you application to use the OS-supplied API for the task. But you have customers behind corporate firewalls, using proxies. The user has set its proxy setting in the system, and their browser is working fine, but you application is not. What to do?
Well Microsoft will advise you to simply call InternetOpen with INTERNET_OPEN_TYPE_PRECONFIG, which will make your application inherit the browser settings (direct or proxy). What do Apple suggest…. this! Tenths of lines of code against a simple parameter of a function.
This happened in a multi-platform project I managed. The Windows developer just took a glimpse at MSDN, added the flag and the proxy issue was forgotten on Windows. The Apple developer took almost half a day to understand the article, copy-paste the example and adapt it to his code. A big productivity win for Microsoft.
Does it matter?
Still, sadly, Joel was right about the outcome. Developers no longer care to learn new APIs from Redmond, and .NET is not very popular either. It is not because of the API war though. The API war played its part but what really mattered is the market and the widespread use of virtualization technology.
No matter how small the combined market of Linux and OS X is, companies don’t want to neglect that. These days you see more and more application sites offering OS X or Linux versions of their software, and more and more hardware vendors provide Linux drivers for their hardware. It is not a single OS world anymore. And this affects developers’ choices of tools and languages. Joel was talking a lot about the backward compatibility and the old code. But how about new code? What will you choose today, if you are starting a brand new software? If possible of course you will choose a technology that does not limit you deployment abilities. If you ever have the choice of .NET over Java – you will choose Java, or regret it later when a customer says “We like you application a lot, but we are a Linux shop, does it run on Linux?”. In that moment, it is not very comforting to say to yourself “Ok, we lost that sale, but hey, Linux is only 2%, why should I care”. And if you choose a technology that binds you to an OS, which today has 99% of the market, you are still gambling, betting all your money on the chance the OS market does not change in the lifetime of your product. Of course, all this is valid for a certain range of applications. But for this range, the developers have started turning away from APIs and technologies that are bound to a specific OS (.NET, Objective C) , and preferring (where possible) cross-platform tools and languages like Java, Python, wxWidgets etc.
As a developer, I am a huge .NET fan. This is the combination of framework and development environment that IMHO makes a developer most effective. As a development manager though, I am a Java/Python fan. Even with somewhat less productivity with the later two, you are ready to deploy on any platform out there and this is becoming more important.
The role of virtualization
The other thing that hurt Microsoft bad is the virtualization technology boom. The biggest advantage of Windows is the huge amount of software available on it. A lot of people have been tempted to switch to Apple or Linux, but were being held back by that specific application that they can’t live without, which is available on Windows only. Well, with the Apple switching to Intel (enabling software like VMWare and Parallels on the Mac) and VMWare doing a Linux version it is not a problem anymore. I know a lot of people that switched and are now running that favorite application in a virtual machine.
Conclusion
So Microsoft won the API war. It did not matter. To win the developers back to Microsoft tools and technologies, they should make them available on all platforms. If there was .NET for Mac and Linux I would, as a development manager, push the developers to use .NET. With .NET being bound to Windows – it is a hard call to make since you are burning your bridges for a Mac or Linux version.