Node.js: Microsoft’s Web Empire is Coming to an End

It appears that Microsoft has just sown the seeds for their own demise. In June, 2011, they announced that they would port Node.js to Windows.

Fast-forward to now. Node.js now runs in IIS with the help of an open-source library called iisnode.

I know what you’re thinking…

What’s Node.js?

Node.js is an open-source web server that is programmed entirely through JavaScript. It’s like Apache, IIS, Tomcat, or other web servers you may have come across. The only difference is it runs JavaScript code. A whole lot of JavaScript code.

Node.js has been growing steadily in the background for years. Nobody gave it much attention. It was sort of a hobby tool that only the uber-geeks played with. Well, no more. When you’ve got serious professionals like Scott Hanselman looking seriously at this stuff, it does make you take a closer look.

What can Node.js do? In theory – anything that Apache or IIS can do. And more – as you’ll see.

What’s the Difference? Or, Why Apache Sucked, Still Sucks, and Will Continue to Suck

As we all know, the Windows world uses IIS. It’s the server that serves up all your neat little ASPX pages. IIS is used on about 40% of servers worldwide.

According to that same CNet study, Apache is used on about 50% of servers. It’s the most popular web server worldwide. It’s popular because it’s free, and because there has always been no better alternative – until Node.js.

So why does Apache suck? According to Wikipedia, Apache was conceived in 1995 and is written in C. Add on top of that the fact that it’s an open-source project and you can immediately start to see the level of complexity of this behemoth. More evidence of the fact that Apache has become unnecessarily complex can be seen in the emergence of Lighttpd – a web server that duplicates Apache’s HTTPd with far less complexity. In fact, Lighttpd powers YouTube, Wikipedia, and Meebo.

But complexity is not the only reason why Apache sucks. While the Apache server itself is quite robust, it’s the libraries and languages that grew up on it that really suck. PHP is a prime example. PHP is the language of choice for just about everyone who does development on Apache. The only language I can think of that is more arcane, backward, and stupid than PHP is C++. PHP was conceived in 1994 as a way to build “Personal Home Pages,” back when a “home page” was nothing more than an HTML3.2 page hosted on Compuserve or Geocities (RIP) designed for IE 3 with lots of blinking text and animated GIFs, to be viewed on a screen with a maximum of 256 colors and 640×480 resolution, over a dial-up 28.8Kbps connection. Times have changed since then, yet PHP has refused to die. Moreover, it carries all of that legacy minutia right to this day. Same as Apache. So let’s call the other reason why Apache sucks “legacy.” Over 16 years of it. Same reason why C++ sucks.

Additionally, PHP has major gaping holes in security. Aside from PHP, for Apache, you have Perl a language that is some 7 years older than PHP. Then you have Django which is a great framework, but which suffers from the same legacy background that the others suffer by virtue of the fact that it runs on Apache. In addition, Python is rather slow compared to Java or .NET. In fact, in some tests even Ruby is twice as fast as Python.

Finally you have Java, and Tomcat. A language conceived at the same time as PHP, Java has lived its life with spectacular tenacity. Despite all of its deployment nightmares, Java continues to linger on enterprise systems simply by virtue of the fact that it is so difficult to work with, thus making contractors tons of money. Why is Java difficult? Well, take the JVM. The JVM was never designed to run a web server. That it allows you to run a web server doesn’t mean you should. Neither Sun nor Oracle have done much in optimizing Java for server-side use, other than providing you with a PHP clone called JSP and a whole plethora of acronyms to memorize. Bottom line – Java was never designed for server-side web application development.

Cutting away all of that nonsense, you’re now left with a seemingly ridiculous choice: CGI and C++. Are you ready to go back 18 years and start from scratch? Well, the people behind Node.js did just that. They wrote a web server from scratch that would be programmable in JavaScript. How cool is that? Pretty cool if you ask me, considering the many advantages of JavaScript which I will go into a bit later.

The development of custom web servers (like Lighttpd) has accelerated over the last decade, as the world kept moving beyond Geocities and Angelfire. Flexibility requirements have grown, and web programming is a lot more low-level now than it was at the start of the web. Web developers mostly want the same things: JSON, XML, page templates, and distributed key-value (“NoSQL”) data stores. The primary reason for this shift is the increase in distributed and scalable nature of web applications. Apps like Facebook or Wikipedia require lots of servers interoperating efficiently over large distances (high latency). Web development in this kind of environment needs to be a lot more modular; less monolithic. This is why a low-footprint zero-config server like Node.js is so exciting.

JavaScript is Winning

In the web development world, JavaScript became the language of choice for client-side programming quite early on in its life. Every website these days uses JavaScript extensively. Even banking sites are being revamped to use AJAX (which is 5 years obsolete already). Newer sites use JSON. AJAX was the transitional step toward creating fully dynamic web applications with JSON. Now, the thought of having a web browser with JavaScript turned off seems insane. Nearly all sites use JavaScript as part of their core functionality now.

That’s the story on the client side. Now, JavaScript, as a language, is quite highly evolved. It’s a dynamically-typed language with minimal keyword use. It has a lot of powerful capabilities not found in C/C++/C#/Java, like the ability to pass functions as parameters with no special treatment, create objects and arrays inline, and even iterate through members of an object (i.e. reflection) naturally with no special libraries required. Because it has no static typing, it’s a lot more flexible than the C-family languages. It’s perfectly suited for modular development, where specifications are not known from the start and where data contracts can vary and are therefore usually implicit.

JavaScript is winning because of its productivity advantage for modular development. Also, being a standard and vendor-free language also adds to JavaScript’s future potential as a language.

With Node.js we finally have a solid implementation of server-side JavaScript. This implementation works on both Windows and UNIX-compatible servers. It can run in IIS or alongside Apache or any other server. In fact, Node.js is based on a standard which is aptly named “CommonJS” and aims to specify the functionality of a JavaScript web server or in fact any standalone JavaScript application.

Next 20 Years: JavaScript’s Rise to Dominance

JavaScript is growing up. It’s moving to the server-side world. It’s already established in the client-side world. I am willing to bet that the next 20 years will be dominated by JavaScript’s ascendance as lingua franca of the world wide web.

We’re in the incipient stages of that now. With Microsoft’s embrace of Node.js they have effectively put an end to their proprietary web empire. Sure, it’ll be a while before all ASP.NET apps are migrated to Node.js. Some never will. But the bottom line is Microsoft has lost the battle for dominance of server platforms, to our collective benefit! They probably know this already. Pretty soon, you’ll start seeing full-blown ports of various bits of the .NET library ecosystem, many sponsored by Microsoft themselves, into JavaScript. When that happens (not if), it’ll just be confirmation that Microsoft’s dominance over the web is ending.

Microsoft’s future, if you’re at all concerned, is not going to be affected by this. They probably have this all factored in. Their future is in developer tools and more importantly business intelligence tools. They will continue to have a first-class platform with Windows, but on the server their market share will drop significantly unless they can come up with something bigger and better than ASP.NET was back in 2002.

As a developer, it is your duty to learn about Node.js and spread the word far and wide. This is positively the “next big thing” after ASP.NET. The way I feel about JavaScript and Node.js now is the same way I felt about C# and ASP.NET in 2002, when I got my first copy of Visual Studio .NET. I made an uncertain investment in my future that paid off back then. I’m about to make another uncertain investment and hope to reap the rewards.

With that, I’m off to install iisnode and read Scott Hanselman’s article about Node.js. Isn’t it great to be mad, Scott?

5 comments on “Node.js: Microsoft’s Web Empire is Coming to an End
  1. Another reason why Node.js is so appealing to me is the fact that I can potentially develop and test my apps on Windows, in Visual Studio or WebMatrix, and deploy them to a Linux server environment without changing any code or configuration files. Big productivity win while saving the monthly costs of a Windows Server license. Not to mention the fact that it runs JavaScript. Imagine that: one language that everyone writes in, that is not controlled by any corporation.

  2. You seem to talk much about what you don’t know. PHP was created in the SAME YEAR that javascript (1995). And age doesn’t decide whether a language is any good or not. Languages like Python, Perl and Ruby don’t get old, they get mature. Sure, cobol and algol died (no offence), but why didn’t C (42 years old) and Lisp (54 years old), or Prolog (40 years old)?

    Your ignorance and incompetence talks instead of you.
    Just read (at least) wikipedia, and stop talking about programming languages before you know something.

    P.S. Microsoft doesn’t have a Web Empire (sic), but seems like their FUD tactics: they make someone say as if they have something big (like a Web Empire), so they can continue on some new technology, while making everyone believe that they already have something big (like web market dominance).

  3. I wonder if this article is intentionally misleading people to MS products, or the author just doesn’t know what he’s talking about.

  4. @Foo Bar: I agree
    @Luka Ramishvili: You hit it right on the head.
    @Rich Remer: Good point. Plus I wonder if Dacris Software is a subsidiary of Microsoft, or they just got paid off to write this article. You know what, it’s not even worth my time to check into it.
    To Dacris Software: Javascript is not a programming language, it is a script. You are incorrect about javascript being able to do things C++ cannot. You just have to learn to write code. That’s why ‘code’ is called ‘code’ and not ‘Joe six-pack language’ . BTW I disable javascript in my browser as do a lot of other people. Pick up a couple of drive-by-downloads instigated by javascript that hose your machine and you might think the same way. They usually run in the bakground and by the time they start affecting performance, the damage is done, not to mention their ability to steal any information off your machine. I think you may still be living in 2002 where you think the internet is a safe playground, it is not.
    You are also incorrect about apache being popular because it’s free. Apache is popular because it is 1000x more secure than any microsloth product out there and microsloth knows this. Did you know that microsoft was approached by certain agencies within the U.S. government to specifically write backdoors into all their products ????
    BTW, why is the page layout of this site a clone of what you see on microsloth’s sites?
    Enough said.

Comments are closed.