A brief message from the school of .NET apologetics

Someone far more experienced and knowledgeable than myself recently made the following remark in a personal correspondence:

Too bad you’re working in .NET. There are TONS of tools out there for the Open Source world. And they’re all free and well-documented, with huge communities of helpful users to answer any question you might have.

To be clear: I don’t have the perspective on this issue that years in the industry naturally bring. My view of the software industry is quite limited. So yes, I am about to offer a quick defense of .NET, and I will be the first to concede that it is biased and perhaps naïve. But I also see this as a two-sided coin: approaching an issue with a boatload of experience to draw on sometimes colors one’s perspective in a way that might not actually be entirely fair to that specific issue.

Let me give an analogy to hopefully explain what I mean, and then I’ll move ahead to my main point.

Imagine you’re a kid, and there’s a family—we’ll call them the Smiths—that lives in your neighborhood. They are a very large family; let’s say a dozen children, all mostly grown. Your mom and dad really dislike the Smiths, based on a substantial history of bad experiences with them. The couple is manipulative and conniving, not to mention greedy and unprincipled. Most of the children are likewise disrespectful, poorly behaved, and just downright mean.

Now let’s say you actually don’t know any member of the Smiths. You’ve never had any occasion to interact with the parents, and most of the children are significantly older than you. But there is one kid in your grade—Billy Smith, the youngest sibling—whom you meet one day during class. He seems like a pretty decent guy, actually. You crack some jokes together, get along fairly well, and you eventually get the impression that Billy is really quite a nice person. You decide you’d like to be friends.

When you go home and tell your mom and dad about this, they immediately disapprove. “Billy Smith?” they ask. “No way. Those Smiths are all a bunch of hooligans, always up to no good. It’s a shame you want to be friends with Billy Smith.”

The point of this analogy should be obvious. It might be true in general that, for example, Microsoft as a corporation has many flaws (not that I have any reason to bash the company personally—but I must acknowledge that they have lots of detractors, and that generally happens for a reason); but this does not necessarily reflect on the quality of every existing Microsoft product. I propose that .NET is like Billy Smith from the analogy; while I can understand why someone who is jaded towards Microsoft with no doubt plenty of good reasons would have no interest in it, I also think that I have valid reasons to respect the framework, and that it is probably easier for me to recognize its merits since I lack the background experience that might cause me to be similarly jaded.

With that said, what follows is my attempt to concisely respond to the main arguments typically made against .NET, both from the statement I quoted above—which I believe fairly represents the viewpoint of a very large portion of software developers who shun .NET—and elsewhere.

Objection: From the quote above:

There are TONS of tools out there for the Open Source world.

Response: The open source world and the .NET world are not mutually exclusive; there are plenty of resources (OSS and otherwise) for .NET as well. Note that the source code for the .NET base class library (yes, Microsoft’s version) is actually freely downloadable, though the code for Microsoft’s CLR (a proprietary implementation of the CLI, standardized in ECMA-335) is not. There is, however, an open-source implementation of the CLI called Mono; and this implementation enables running CLI programs (a.k.a., what we commonly refer to as “.NET programs”) on plenty of non-Windows platforms. Also, plenty of open source .NET applications and toolkits exist; for examples, see CodePlex or go to SourceForge and search for projects written in C# (there are currently over 13,000 of them).

Objection: Again, from the quote above:

And they’re all free and well-documented, with huge communities of helpful users to answer any question you might have.

I know this is just one example, but there is a very huge community of helpful users that is heavily slanted towards .NET: Stack Overflow (though the site is actually language-agnostic in principle, and plenty of non-Microsoft technologies have lots of users on the site, there’s no denying that the site’s largest demographic comes from the .NET community), which also happens to be one of the top 500 sites on the internet.

Objection: .NET is owned by Microsoft, which means the company has complete control over the future of the framework.

Response: I am by no means an expert on this topic, so take my response here with a grain of salt. But I don’t think this is really accurate. Consider the fact that both the CLI and C# itself are standardized in ECMA-335 and ECMA-334, respectively (to be fair, the latest versions of C# are not standardized, unless I’m mistaken). And remember that Mono provides a cross-platform implementation of the CLI, which means that even if Microsoft decided to “pull the plug” on .NET, there would still be a totally feasible way to build and deploy CLI applications written in C# to all platforms, including Windows (unless Microsoft could somehow refuse to allow Mono to run on Windows, which I suppose is at least feasible—but that would seem disastrously harmful for them). Porting existing Windows-only .NET apps to Mono would be, in most cases, very possible, if not downright trivial (in many cases, no work would be needed at all).

Objection: .NET is just a Java rip-off.

Response: This one I’m less qualified to respond to. All I can do is point out that Java is getting old at this point, and with age comes a certain degree of stagnation. I’m not saying that Java is not a stable, robust, and very valuable technology within the software industry; but from my limited knowledge, I perceive C# to be in many cases a significant improvement over Java (see here for a detailed comparison; note C#’s unified type system, mechanism for defining custom value types, support for passing parameters by reference, superior generics implementation—e.g., better constraints, no boxing for generics with value type parameters—and superior support for functional programming constructs, just to name a few). And I don’t think I’m alone in feeling this way: take a look at the April 2010 Technology Radar document released by Thoughtworks (a well-respected company in the industry, certainly not a Microsoft puppet), in which C# 4.0 is given a rating of Adopt while “Java Language end of life” is rated Assess. The company has this to say about Java as a language (note that as a platform, the JVM is still regarded as vital within the software industry):

With the increase in number of languages available on the JVM, we expect enterprises to begin to assess the suitability of reducing the amount of Java specific code developed in their enterprise applications in favor of these newer languages.

Anyway, I just think a lot of people don’t give .NET a fair shake. And while I understand why this is—just as I could understand why the parents in the above story would be skeptical of anyone in the Smith family—I still believe it deserves some consideration.

By the way, I am very interested in receiving feedback on this post! I am certainly not a “disciple” of .NET (I really do enjoy Ruby, though I am a novice at it; and I am also quite interested in learning other languages completely unrelated to .NET). If I have made any inaccurate or misleading claims above, please let me know and I will do my best to fix/clarify/resolve them.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: