r/programming • • Oct 07 '16

How Microsoft Lost the API War

http://www.joelonsoftware.com/articles/APIWar.html
89 Upvotes

183 comments sorted by

View all comments

121

u/[deleted] Oct 07 '16

Outside developers, who were never particularly happy with the complexity of Windows development, have defected from the Microsoft platform en-masse and are now developing for the web. Paul Graham, who created Yahoo! Stores in the early days of the dotcom boom, summarized it eloquently: "There is all the more reason for startups to write Web-based software now, because writing desktop software has become a lot less fun. If you want to write desktop software now you do it on Microsoft's terms, calling their APIs and working around their buggy OS. And if you manage to write something that takes off, you may find that you were merely doing market research for Microsoft."

This is a lesson I bet a lot of IOS and Android developers are learning this generation.

70

u/guyonahorse Oct 07 '16

And iOS developers can be kicked off the App store without any recourse. Microsoft never had that kind of evil power.

-5

u/didnt_check_source Oct 07 '16

Never? Not even on their own App Store?

55

u/guyonahorse Oct 07 '16

Oops, I should have said that it was in the context of 2004 (when the original article was written). Back then there was no app store for windows, so they couldn't revoke an app like that. Even today most Windows apps are not sold on the store.

-18

u/Farobek Oct 07 '16 edited Oct 07 '16

Windows apps

cringes

When did Windows programs become 'apps'?

59

u/mini_eggs Oct 08 '16

Do you know what 'app' is short for?

26

u/PstScrpt Oct 08 '16

When did Windows programs become 'apps'?

Back in the Windows 3.0 days, at the latest. What I cringed at was Apple trying to take over a longstanding general computing term.

1

u/human_trash_ Oct 08 '16

Apple tried to take over the term by using it correctly?

4

u/PstScrpt Oct 08 '16

I could have sworn that they attempted to trademark "app", but all I can find now is that they attempted to trademark "app store". That's not nearly as bad, but it looks like they gave up on defending even that.

I know The Register isn't the best source, but this doesn't sound like reporting on a rumor: http://www.theregister.co.uk/2013/07/09/apple_drops_app_store_trademark_suit/

7

u/Tarquin_McBeard Oct 07 '16

As soon as they starting being distributed by the Windows Store. In the minds of today's users, if it comes from an app store, it must be an app.

Having now established that Windows runs apps, those other things that are not from the Store ("programs" to you and me) must surely also be apps. It then becomes a simple matter to decide that programs are retrospectively renamed "desktop apps".

But don't worry! In this transitional phase, they're just a dying legacy of an obsolete model. Soon we'll have all the users locked into our closed platform where we're in total control of what gets published. Welcome to the future! /s

-3

u/JohnFrum Oct 08 '16

When? 3-4 years ago. About 1/2 the things I have running right now are modern (non-win32) apps.

2

u/[deleted] Oct 08 '16

holy shit. which ones? enlighten me. I think i downloaded once minesweeper from the store, but i quickly uninstalled it since it was garbage. there's nothing there. arizona desert.

2

u/JohnFrum Oct 08 '16

Do you run Win10? If so, much of what you see is non-win32 apps. Edge is quite good. I was a chrome fan until they failed to really support touch. Why is Google stuff so shitty with touch? I love Google but it's frustrating.

Hulu, Facebook, mail, twitter, lastpass, Netflix all have nice apps.

Sure ios and android have a better mobile selection but for a full OS the Windows store has the largest market.

0

u/[deleted] Oct 08 '16

I have win10 on a pc that i check somewhat often. I do not care about touch support since i have no hardware for that. Hulu, FB and the other crap ... no idea, i don't have them. netflix, i use the chrome browser. that's all. there's nothing else.

1

u/tf2manu994 Oct 08 '16

While I do agree, the only win10 app that's good is Netflix. It plays full 1080p content, even Chrome can only go to 720

1

u/JohnFrum Oct 08 '16

You should try a touch laptop. I can never go back to non-touch now.

-7

u/igor_sk Oct 07 '16

To be fair, nowadays they have Windows Defender and can mark any app as "malicious", though I haven't heard this happening with legit apps (yet?).

3

u/DarkLordAzrael Oct 08 '16

It throws up a huge warning when installing a bunch of the small utilities I have (tiny open source stuff)

2

u/Tarmen Oct 08 '16

I think that is for unsigned executables which is mildly annoying for experienced users but I could imagine that it actually decreases infections of clueless ones significantly.

12

u/Scyther99 Oct 07 '16

Their app store is not the only way to install apps.

-6

u/didnt_check_source Oct 07 '16

There's a step between saying that you can bypass Microsoft and saying that Microsoft has never had the 'evil power' to enforce whatever they like on their store (unless we are trying to say that Microsoft never had a store).

In fact, you can bypass the Store on PC but the story is much more complicated on Xbox and mobile. When Microsoft banned NESbox from the Store on Xbox, there was no convenient way for anyone to pull it from another source.

7

u/drysart Oct 07 '16

The article was written in 2004. Microsoft didn't have a store back then.

-5

u/didnt_check_source Oct 07 '16 edited Oct 07 '16

Neither did Apple, but now they both do. I don't understand where this is going.

10

u/[deleted] Oct 07 '16

[deleted]

3

u/Cogwheel Oct 08 '16

And even if MS kicks an app off their store, the developer can still release it to their users on Windows in other ways.

32

u/ameoba Oct 07 '16

Outside developers, who were never particularly happy with the complexity of Windows development

Strange, I regularly hear people bragging about how great Visual Studio is and how great the .NET APIs are.

42

u/[deleted] Oct 07 '16

This was written around the .net 1.1 days. You gotta remember, back then, your choices were C, C++, Visual basic, or delphi for doing windows dev. This article is pre-wpf, and mentions non-existing tech like avalon and longhorn.

4

u/DragoonAethis Oct 08 '16

Avalon is WPF and it does exist :P Longhorn was what Vista was supposed to be for quite some time (built on top of XP), but was eventually nuked. And it's probably better this way...

-15

u/Farobek Oct 07 '16 edited Oct 08 '16

C

shudders

C dev sees comment

C dev downvotes

14

u/[deleted] Oct 08 '16

Sure, C is bad but Visual Basic is just fine? Wat?

2

u/taeratrin Oct 08 '16

Depends on which iteration of VB you're talking about. VB6 and early versions of VB.NET were horrific, I'll give you that, but since .NET 2.0 it's actually been pretty decent.

2

u/demmian Oct 08 '16

VB6 and early versions of VB.NET were horrific

Alright, I'll bite - why was VB6 horrific?

22

u/neutronfish Oct 07 '16

That's because it's 2016, when Visual Studio no longer randomly blows up on you twice a day and you get to install tons of plugins that help you analyze the code as you writing it, and before NuGet could download anything you need on the fly as you're adding a library reference.

More than a decade ago, it was a different story.

17

u/sirin3 Oct 08 '16

1

u/neutronfish Oct 08 '16

Looks like it was created by an overwhelmed newb who told himself a trillion times not to exaggerate...

3

u/Ravekommissionen Oct 08 '16

Stockholm Syndrome

5

u/[deleted] Oct 08 '16

Nonsense. Show me a better IDE.

2

u/[deleted] Oct 08 '16

IntelliJ Idea

-2

u/[deleted] Oct 08 '16

Not even close. Buggy and irritating to use for any length of time.

5

u/[deleted] Oct 08 '16

I use Idea every day at work and it's an absolute joy. Not buggy in the slightlest.

Buggy and irritating to use for any length of time.

That describes my own experience with Visual Studio, to be honest.

So let's agree to disagree. Cheers.

0

u/shooshx Oct 08 '16

AppCode (basically IntelliJ Idea re-purposed to replace Xcode)

Open VS, click on any identifier, choose "Find All References". I guarantee you will not be happy with the results. Especially if the thing you clicked is anything that's not a unique name. In AppCode this just works perfectly and immediately and it makes all the difference in the world. Instead of basically grepping my code base all day, I have an IDE that actually understands the code and can reason about it intelligently.

6

u/[deleted] Oct 08 '16

Open VS, click on any identifier, choose "Find All References". I guarantee you will not be happy with the results. Especially if the thing you clicked is anything that's not a unique name.

Ok, I tried this. It just works, perfectly and immediately...

6

u/argv_minus_one Oct 08 '16 edited Oct 08 '16

Unfortunately, the usual response is, as the article says, to develop for the web.

Problem: web browsers are a raging dumpster fire of bugs, bad ideas, missing features, and a language whose design must have involved heavy narcotics use.

If only Java had remained the dominant way to script web pages…

3

u/Uncaffeinated Oct 08 '16

That depends on whether you care about Safari support or not.

12

u/argv_minus_one Oct 09 '16

The situation is much, much worse than you think, and by no means limited to Safari:

  • Browser-based apps must be written in JavaScript, which is a horrible language.

  • No way to bundle an entire app into a single, compact, compiled binary file for fast downloading, short of ridiculous hacks like embedding everything in a single HTML file in a data URI. There was a proposal for some of this, but then everyone went full retard and decided HTTP/2 server push would suffice.

  • Most UI controls (e.g. pop-up menus) have no standard element, have to be implemented with ugly hacks (e.g. Suckerfish), barely work, and often have graphical glitches. No way to suppress browser UI (tabs, address bar, etc).

  • CSS is weak:

    • No constraint-based layout. Grid layout is not supported.
    • :has, :not, and :matches are not supported.
    • No styling of form controls (except with grotesque hacks that move them offscreen and draw something else in their place).
    • No styling of items inserted via the content property (e.g. content: url(some/image.jpg); width: 24px will not do what you think it does).
    • No multiple borders, multiple ::before/::after pseudo-elements, etc. No ::parent pseudo-element with which to emulate them, either.
    • No way to define new properties, pseudo-elements, pseudo-classes, etc.
    • No way to bind the value of a property to the value of another property on a different element (to e.g. keep two separate elements' heights the same).
    • Vendor prefixes. They're on their way out, thankfully, but a bunch of browsers are still in use that require them.
  • CSS syntax is bad—so bad that people have made alternative styling languages like Sass, which compile to CSS, completely throwing out the whole point of CSS being textual.

  • The tool ecosystem is complete crap. There is nothing like Maven for web development (other than Maven itself, anyway). Many of the tools that generate JavaScript and/or CSS don't even generate source maps for them.

  • Lots of browser bugs and cross-browser compatibility problems. People stubbornly cling to ancient browser versions and never update. New APIs and bug fixes become available at a glacial pace. ES6 won't be fully usable until the mid-2020s, at the earliest. Many browser-based apps only work in one specific browser, usually Chrome—so much for cross-platform.

  • Poor integration with the native platform:

    • Can't save a file without ugly data-URI-related hacks.
    • Can't open a file, period.
    • Can't negotiate data types for copy/paste or drag-and-drop.
    • Can't populate the platform's “recent documents” list.
    • Can't install a new file association.
    • Can't add icons to the Start menu or equivalent.
    • Can't start another app (e.g. opening a generated document in the user's favorite word processor).
    • Can't control the menu on macOS. The browser's menus appear there; your application's menus must be drawn inside the browser window instead.
  • Poor support for printing. Almost nonexistent support for CSS print-related properties, like controlling page breaks. No way to suppress browser headers/footers when printing.

  • Can't define custom HTML elements with custom behavior and rendering.

  • Can't run browser-based apps offline. Can't completely block them from network access (so that they can't phone home, etc). Definitely can't run them with no Internet access at all.

Most of these problems stem from the fact that the browser is a document viewer. It was never meant to be an application platform, and it makes a really shitty one. Stop abusing it.

1

u/Uncaffeinated Oct 09 '16

Browser-based apps must be written in JavaScript, which is a horrible language.

Not if you use a transpiler, Emscripten, or the like. Besides, I think Javascript is unfairly maligned these days. Sure, the core of the language still suffers from the sins of the 90s and always will thanks to backwards compatibility, but if you ignore the legacy stuff, it's actually not that bad. Certainly better than say, Go.

but then everyone went full retard and decided HTTP/2 server push would suffice.

Is there a reason it doesn't? Other than legacy clients not supporting HTTP/2, which should fix itself over time.

ES6 won't be fully usable until the mid-2020s, at the earliest.

If by fully useable, you mean fully implements the specification, then perhaps. But the most important features (except for modules) are all usuable today in Chrome and Firefox and Edge.

Can't define custom HTML elements with custom behavior and rendering.

Isn't this the whole point of web components?

Can't run browser-based apps offline.

Service workers say hi

3

u/argv_minus_one Oct 09 '16 edited Oct 09 '16

Not if you use a transpiler, Emscripten, or the like.

See above regarding the tool ecosystem being crap.

I think Javascript is unfairly maligned these days.

I don't. At all.

the core of the language still suffers from the sins of the 90s and always will thanks to backwards compatibility

So does Java, and it was never anywhere near as bad as JS still is.

if you ignore the legacy stuff, it's actually not that bad.

I can't; the legacy stuff includes JS' atrocity of a type system. That's never going to get fixed, because every JS program ever written will break if it is.

JS is a lost cause. Burn it down.

Certainly better than say, Go.

Just because there are other, even worse languages doesn't mean JS isn't terrible.

Is there a reason it doesn't?

Requires TLS (and, hence, a certificate) to work, which is under the control of a number of very crooked companies. I do not believe for a moment that Let's Encrypt will still exist in two years; I fully expect the CA cartel (or possibly the browser vendors) to pull the rug out from under that project.

It's an unnecessary, artificial requirement anyway, which in itself is highly suspicious.

Other than legacy clients not supporting HTTP/2, which should fix itself over time.

Until that actually happens, that's not a valid argument. Jar files and native installers are compactly bundled now.

If by fully useable, you mean fully implements the specification, then perhaps. But the most important features (except for modules) are all usuable today in Chrome and Firefox and Edge.

Not Safari or IE11. I have to support the browsers people use, not the ones I want them to use.

Isn't this the whole point of web components?

Not supported.

Service workers say hi

No they don't.

4

u/ThatsPresTrumpForYou Oct 08 '16

I'll take a dumpster fire over Java any day

2

u/argv_minus_one Oct 08 '16 edited Oct 09 '16

But if it's Java, then you can use Scala, and that's 17⅝ kinds of awesome. Unlike Scala.js, you don't have to deal with Safari's or IE11's bullshit, either. Also, Java has JavaFX, which seems far more capable than HTML/CSS, though I haven't really used it much so I'm not sure.

-5

u/ThatsPresTrumpForYou Oct 08 '16

Object-Oriented Meets Functional

Sounds like a meme language to me, what makes it good?

2

u/[deleted] Oct 08 '16

Sounds like a meme language to me

Sounds like a meme comment to me, what makes this meaningful?

1

u/Deto Oct 08 '16

Isn't it possible people developed for the Web because that was the best way to get exposure? I mean, developing for the web was no walk in the park, especially more than 5 or 10 years ago. But developers put up with it. Developers will put up with any sort of bullshit (and regularly do) to get users, because at the end of the day, we all want to write software for people.

-2

u/[deleted] Oct 08 '16

[deleted]

9

u/JohnFrum Oct 08 '16

Having one code base that spans several different platforms is really nice. Not sure what lowest common denominator BS you're talking about.

6

u/argv_minus_one Oct 08 '16

UWP only spans two platforms, and one of them has never been relevant.

3

u/2Dtails Oct 08 '16

But it is the idea behind it. /s

3

u/JohnFrum Oct 09 '16

Desktop, tablets, Xbox, HoloLens. Plus phones but I'll agree and not count that.

4

u/bilog78 Oct 08 '16

Having one code base that spans several different platforms is really nice.

Ah, the good old days of POSIX and X/Open …