views:

970

answers:

14

This question was inspired by two interesting articles: "How Microsoft Lost the API War" by SO's very own Joel Spolsky, written in 2004, and "From Win32 to Cocoa: a Windows user's conversion to Mac OS X" [Part 2] [Part 3] by ArsTechnica's Peter Bright in 2008. These two authors believe that Microsoft has lost its focus on the API that made it the platform of choice for developers. As Spolsky writes:

Microsoft's crown strategic jewel, the Windows API, is lost. The cornerstone of Microsoft's monopoly power and incredibly profitable Windows and Office franchises, which account for virtually all of Microsoft's income and covers up a huge array of unprofitable or marginally profitable product lines, the Windows API is no longer of much interest to developers.

Bright says:

Windows is dying, Windows applications suck, and Microsoft is too blinkered to fix any of it—that's the argument. The truth is that Windows is hampered by 25-year old design decisions. These decisions mean that it's clunky to use and absolutely horrible to write applications for. The applications that people do write are almost universally terrible. They're ugly, they're inconsistent, they're disorganized; there's no finesse, no care lavished on them. Microsoft—surely the company with the greatest interest in making Windows and Windows applications exude quality—is, in fact, one of the worst perpetrators.

Considering Microsoft's recent software offerings with the Vista API, .NET 3.5, LINQ, and WPF, would you say this still true? Or does Microsoft's future lie with ASP.NET and MVC, and Silverlight (aka WPF Everywhere)?

In other words, if you could start a brand-new project from scratch, with no dependencies or old code to support, what would you choose to develop with (Win32, WPF, .NET, Cocoa, ASP.NET, etc)? Is Microsoft winning or losing the API war?

+1  A: 

No

Well, Microsoft's real crown jewel is the .NET Framework (which includes Silverlight and WPF). And, as they keep improving the framework and the languages that target it, they keep improving the way software development is done.

I'm not sure who is really winning the "war", but Microsoft has been making great strides over the past few years.

Plus, the Mono Project brings .NET to other platforms (OSX and Linux) in an Open Source manner. So, I would definitely say that they haven't lost. They may loose financially if Windows stops selling (which will not happen anytime soon), but they will definitely win with an excellent cross platform development platform.

Chris Pietschmann
Why? I'm looking for answers, not a poll.
amdfan
But, you asked a Yes or No question. So you get a Yes or No answer.
Chris Pietschmann
Sorry, that wasn't my intention. I changed the title.
amdfan
And, I changed my answer to explain
Chris Pietschmann
Silverlight is cross-platform too.
chakrit
+12  A: 

I've always disagreed with that article. (I don't always agree with Joel, but he does write ever so well.) .NET is - by and large - a lovely framework to use. The main problem with it as far as I'm concerned is the portability - Mono is great, but it doesn't have enough momentum (IMHO) to make CLI-based code as ubiquitous as Java.

I'm not always happy when it comes to design decisions around the "periphery" of .NET (i.e. the top of any application stack - WPF, WinForms, ASP.NET etc) but the core is generally well designed. DateTime always stuck out as a poor bit of API, but now that's been improved in .NET 3.5 with the DateTimeOffset/TimeZoneInfo combination. (It's still not as comprehensive as Joda Time, but it's a lot better than it was.)

And then there's C# as a language... simply beautiful, IMO. Considering it's been designed as a pragmatic language (i.e. some purity sacrificed for real-world use) it's a phenomenal piece of work.

Let's see how well the DLR works... that would be icing on the cake, if they really pull it off.

Likewise Parallel Extensions (the most exciting part of .NET 4.0 that I've heard about so far) looks like being the easiest way to parallelise that I've seen. The java.util.concurrent package may have been ahead in terms of time, but without lambda expressions you lose readability fast. (Of course functional languages tend to make parallelisation a lot easier to start with, but I personally haven't got my head round them enough to use them for real projects - yet.)

Jon Skeet
+2  A: 

For the sake of full disclosure, I will say right off the bat that I am a full-time .NET developer for a company that is partly owned by Microsoft.

Having said that, no, I don't think that Microsoft is losing the API war, for several reasons.

  • Windows Vista was the recipient of some pretty drastic additions and chages to the Windows API--in fact, one could argue (I won't go so far as to do so) that the focus of Windows Vista was to improve the Windows subsystem and API features.
  • .NET, ASP.NET, ASP.NET MVC, WPF/E, WPF, WCF, IIS 7, and a whole host of other new technologies by Microsoft have been steadily gaining market share. I use a number of these technologies, and one of the biggest reasons I use them is for the well-designed APIs.

I don't want to get into a religious war, but when I compare Microsoft APIs to competitors (like Java, Mac OSX, etc.), I find that I like Microsoft's style of architecture more. That isn't to say that other APIs aren't good as well, but I prefer Microsoft.

Ed Altorfer
I would agree with you, however I'm under no illusion that the only reason I prefer the microsoft ones is because I'm used to them. Everyone prefers what they feel comfortable with!
Orion Edwards
+2  A: 

In other words, if you could start a brand-new project from scratch, with no dependencies or old code to support, what would you choose to develop with (WPF, .NET, Cocoa, ASP.NET, etc?)?

The fact that Win32 is not the defacto answer (in fact is not only not even among your choices) is the whole point. This is why they lost the API war (if you subscribe to Joel's idea). They obsoleted nearly all of their developer platforms. (don't even get me started about VB6)

I basically agree - but maybe I'm just a bitter C++ Windows developer.

Aardvark
I love C++, but most applications should be written at a higher and safer level of abstraction.
Curt Hagenlocher
+1  A: 

I lost track of technologies coming out of Microsoft.

Also, things have changed a lot, especially under Scott Gu. From the blogs, it is very clear they are embracing and supporting open source projects, getting more feedback, listening to the users. I would stick with Microsoft for now.

Gulzar
+3  A: 

I'd say the Win32 API is still pretty active.

How else would you develop on windows if you don't have Win32 APIs? Ask any game developer they all know some Win32 treats.

But for the business side of things, I think MS is actually making a grand push on the war front with the .NET technologies. I can't say much because I have only been to Python and C++ and a little Java in college but I would say that the Microsoft own development stack is more important than what most non-MS people know about.

You see when you think about .NET, most .NET developers think of these as well:

  • Visual Studio
  • SQL Server
  • IIS
  • Windows Server

And they are all nicely integrated together. Of course, MySQL Apache linux whatever is also cool and don't cost a premium to use, but think about how a fresh-out-of-college junior would fare against corporations running those and one which runs full MS stack? Let alone if they are able to hire programmers smart enough to use them.

And about the last question, it depends on the project. One thing is, if I don't mind it being Windows-only then I'd probably choose .NET WinForms, it's very easy to get up and running. If it's on the web I'd either do ASP.NET MVC because I am a desktop developer by nature not a web-one or I might go Python-Django route. It depends on many things.

chakrit
+2  A: 

I don't think Microsoft was ever in danger of losing any API war.

It hasn't been perfect, but even at it's bleakest times Windows has been a pleasure to develop rich client applications for in comparison to any other platform in my opinion.

As far as what I would prefer to use, it would depend on the type of project. If I didn't have to worry about client compatibility issues I would use .NET. If I was developing for Windows only and I had to deal with the reality of the proliferation of .NET among end users, I would use Win32 via MFC. If I was developing an application that would work well as a web-based app, then I would probably use ASP.NET MVC.

Gerald
+3  A: 

I don't think Microsoft is loosing anything, It's just that it's not winning anything new either.

As a computer user (Mac, Windows, Whatever) tired of the whole religious war on everything from competing vendors i have this to say:

  1. Apple is moving from Carbon to Cocoa
  2. Microsoft is moving from win32 to .net

It just makes lot of business sense to deprecate old and difficult when new and easy becomes available.

Because between two or more frameworks or toolkits, the best one is the one that requires the least amount of brainpower to deal with for its users. The less energy is required to deal with the toolkit, the more is left to solve the actual problem.

Both vendors are doing rather well on their newer technologies if you ask me.

Kris
May I never live to see the day that .Net replaces the Windows API!
George Edison
.Net is just another Windows API, built on top of win32 (and win64 nowadays). Since .net relies on win32, it can never replace it, only extend its functionalities.
Kris
+2  A: 

As far as API war is concern, Microsoft has NOT lost at all... It may be losing few percentage of market share, but still holds the largest market share overall...

If I was to develop a new software I wouldnt use cocoa, because that would mean I would target my software users only for Macs users... Microsoft has a huge user base and that is one big advantage that's hard to be beaten...

For those who embrace .NET Framework, should embrace Windows APIs as well... Why? because some of classes in .NET Framework in the end calls Windows APIs to do the work for them...

Just my 2 cents,

RWendi

RWendi
+11  A: 

First, (and this is in my profile). I'm a developer at Microsoft - I work on Windows.

Now, the first question to ask about a project isn't what API's to use, its what is the target audience and what platforms do they use. If you are targeting Apple platforms because you want to satisfy a need for Apple users, then you will use their APIs. If your target is Linux users, then there are a plethora of Linux oriented things to sue (boy what a Freudian slip, should have said 'use'). Same for Windows. It becomes more challenging if your product needs to run on multiple platforms you then need to address a host of cross platform development issues.

There is way more to development than just the APIs - there is testing, deployment, maintenance, servicing, and support. All of these platforms have their strengths and weaknesses in these areas.

If you are lucky, you'll also get to choose your development tools for: compiling, linking, debugging, profiling and other perf work, source code control-ing, requirements tracking, code design (UML etc), building, bug and work item tracking, testing and test automation, planning (scheduling), documenting (internal and external), internationalizing. Again, with each platform there are many difference choices.

Of course, you'll need these things to one degree or another. If the project is small, then you can track requirements in a simple spread sheet. If its complex, then you'll need a good way to make sure that requirements are gateher, understood, specified, coded, tested, documented, and delivered.

Its all about best enabling developers to build software that users want. At the end of they day - I would argue that there isn't an "API War" there is competition for developer mind-share based on a broad set of platform considerations. API's are indeed a part of this, but only a part.

Foredecker
Haha, it's a Litigious Corporation Freudian Slip!"...there are a plethora of Linux oriented things to sue."
Jacob
Way to avoid answering the question.
Max Howell
But wouldn't you agree that the dominance of a platform depends, at least in part, on the APIs? That's what I'm getting at. Awesome to have your input, though.
amdfan
I amdfan, no, I don't think Microsoft success (what you call dominance) is due simply to the WIn32 or other Microsoft APIs. I only have 159 chararcters left, not enough to go into detail :)
Foredecker
:) Boy, that was a Freudian Slip! I'm famous for my typos at work...
Foredecker
Aren't you trying to change the question here? The text of the question is "no dependencies". This could be new kiosk systems for all we know. Otherwise, I agree totally with your concluding paragraph.
Guge
Hi Guge :) No, I'm not trying to change the question. My point is that the API's themselves are a small part of the equation.
Foredecker
typo: difference should be different. But the other typo is truly majestic, +1 for that alone!
MarkJ
A: 

I don't think they lost the war. I think they have lost a few battles on the way. But as mentioned in the question, Microsoft are constantly innovating and are choosing new battle grounds to play in.

Keith Nicholas
A: 

I think of .NET as separating programming on windows from the windows api. Some of the api has been ported to managed code, some wrapped and some you still need p/invoke. I think this gives microsoft a strong advantage as they move more to .NET they are more easily able to change the underlying os as the .NET version of the api can be updated separately according to the underlying os.

I think this is a very good idea, microsoft are looking to the future where people are going to be essentially carrying around their programs with them. Just plug in a usb drive to get your programs (or maybe straight from the internet) with all your settings and customization no matter what computer you plug into. The way to achieve this is to abstract the api to allow very different underlying os's and to hopefully get rid of the windows registry. Look at microsoft midori project for the kind of things they are thinking about.

PeteT
+2  A: 

In other words, if you could start a brand-new project from scratch, with no dependencies or old code to support, what would you choose to develop with (WPF, .NET, Cocoa, ASP.NET, etc?)?

If it was in c++,I would use QT. It's a very nice toolkit and you can port to Mac and Linux with very little effort.

Martin Beckett
wxWidgets also allows easy porting, though it only covers GUI widgets (what Win32 people call controls) and not systems stuff. Dunno how easy it is to program in wxWidgets compared to Qt though.
crosstalk
I have done commercial apps in wx. It's very good but is slightly dated in using macros and being very MFC like. The quality of some of the widgets isn't as good
Martin Beckett
+1  A: 

I think MS, Apple and Linux have all beaten the same dying horse around the track way too many times. Architecturally they are fundamentally identical - just see how easy it is for a developer to from from one to another. They all derive, explicitly or implicitly from unix, and add some kind of windowing software for a user interface. It's hard to see what user benefits derive from their ability to soak up ever-increasing quantities of ram and cpu cycles.

It reminds me of the games box wars. And I'm looking for Wii.

From an Economist article a couple months ago: China has the fastest growing internet user base in the world, both in real and percentage terms. And 40% of new users added in the last year access the internet on their cell phones. It didn't say, but it sure seems a safe bet to me that they weren't foregoing a PC at home - there isn't one.

Interesting that Apple and Google have jumped into this much more aggressively than MS, both technically and marketingly (yes I made that up). and are pulling away. I wish there were any evidence that WinCE was as strategic for MS as it obviously is for those two. I think that's the war that counts.

le dorfier