Just recently I gave an in-depth reply on a forum to a question that I know I have answered before. When you need to give the same lengthy answer more than once you should write an article to save your keystrokes and just link the article the next time someone asks the same question. This particular question was:
"If I am involved in a web project where I get to make the decision about the technology stack why would I choose .NET. Why would I choose a stack that costs money, makes the project dependent on a vendor (updates, new versions, etc.) instead of use PHP, Python, Ruby or Java. I don't see any serious technical advantages of ASP.NET and the communities of competing technologies are usually bigger and more helpful." This is a reasonable question although it contains some false assumptions. The classic answer to this question is TCO - total cost of ownership. It is of course very hard to pin down what this really means and the fact that marketing people have twisted it is not the only reason for this. It is entirely possible that certain developers or teams can produce good software faster and cheaper in C#/.NET while others are better when using Python. Both sides can be correct although they went with different choices. Of course I am absolutely sure that no team can produce better quality software in PHP than they can do it in C# or Python given equal amount of experience with the stacks. I will treat the mention of PHP as a joke and focus on the other stacks from the question.
So here are some reasons that in theory and depending on subjective judgment can result in lower TCO for ASP.NET projects compared to other stacks.
- C# is the best mainstream programming language. It is very well thought out, prevents the greatest number of mistakes, allows powerful refactoring and other tools (and yes this is a language feature). It is possible that time to market will increase compared to dynamically typed languages but this is expected to pay off in the long run as the project enters maintenance phase. Of course if the team consists of a single developer who is very skilled and the project does not involve long-term support then Python is probably a better choice but in enterprise environment a lot of people of different skill levels work on a single potentially endless project. This is why C# and Java are often used in this context. I assume that the rest of the stack (ASP.NET, the .NET Framework, etc.) has similar advantages compared to the corresponding Ruby and Python elements but I am not experienced with them so I cannot give examples. It seems like currently Java is the only thing on the market that can compare to (and even beat) C# in this respect and while it has powerful ecosystem focused on enterprise development and long term support the Java language is definitely not as good as C#.
- One can imagine a primary web project that is not entirely web. Lets take for example a banking system although other examples that are not so large and enterprisey can be given. Imagine that the product has a web part where customers check account statuses, a desktop part which bank employees use extensively every day so it makes sense to use the full power of the desktop and mobile apps for iOS, Android and why not Windows Phone and Windows 8. You can probably build the web part in Ruby, the mobile apps in Objective-C, Java and C#, use Python for the API service for the apps and Delphi for building the desktop app because you know this is how you would build these things in isolation. Or you can build everything in .NET and share parts of the code. You can use a single team of .NET developers who can switch roles relatively easy compared to the alternative Python/Ruby/Objective-C/Java/C#/Delphi team. Currently the only technology stacks that can claim such an ubiquity are .NET and JavaScript (and I believe building such a system in JS would be like building it in PHP). Java used to have such an ubiquity but currently C# is better as it has mature production level tools for building iOS applications which Java lacks.
- At first it may look like having a lot of choice for each part of the stack is always good but first impressions are not always right. Monoculture has its advantages. Even if some part of the stack is not optimized for the task at hand if there are no alternatives there is high chance that someone has encountered and documented how to work around the issues. When there is a single choice for each part of the stack this means that there is a lot of know how and the parts are tested and work together very well. In the Java world it is possible to end up with a unique combination of ORM, web framework, logging framework etc. If no one has used this combination then chances are it will produce some unique problems that you will have to solve yourself. On the monoculture side the know-how can easily compensate for tools that are not entirely suitable. You can absolutely hammer a screw into position if you know how. In addition when tools come from Microsoft the documentation, the patterns and the naming convention are always in line with the same standards and it is far easier to find your way around a new framework. They all look similar even if you are a first time user of some specific tool. I do not claim that monoculture is better but it is not obvious that it is worse and even if you think that open culture has more benefits you should admit that monoculture has some non-zero value.
- Even if you are talking about a web project it is entirely possible that you are working in an MS environment. Maybe you need to integrate with active directory, generate Excel spreadsheets or integrate with Sharepoint. I do not think there is any argument about which stack is best suited for the job and has the greatest amount of know-how.
I would like to address some of the misconceptions in the question.
- Costing money is something very subjective. While it is true that Windows costs money it is often already available due to other needs of the company. Visual Studio and SQL Server both have free versions which are extremely potent and fit for developing small scale commercial software. If the project is large chances are that the cost of software will be negligible part of the budget. Negligible things can be neglected.
- Dependence on the vendor is also subjective if you are small (i.e. your company is not Google, Oracle, etc.) I feel dependent on open source project I use because I lack the skill and resources to develop them if they get abandoned. Let alone that some companies prefer to have someone to sue if the project is abandoned to being able to take over development. Overall the point in the question is a good one because I am somewhat tired of following every word from Microsoft that may hint at the death of a certain technology. However the web stack is probably the most stable, open and shielded from this attitude.
- The claims about the .NET community are plainly wrong. First of all PHP may have a larger community but the quality is much lower and Ruby and Python communities are certainly smaller. The Ruby community in particular is known for a lot of internal conflicts and scandals. I would even go as far as question if the Java community is bigger and point out that C# is the most popular tag on Stack Overflow. The .NET community does have a property that may be seen as negative and anti-community but I have not ever seen any outsider spot it. Outsiders think that the .NET community is not friendly and no one will answer your question unless you pay because there is no open source culture of sharing. This is certainly NOT the case. The problem is that the .NET community is (or was) too dependent on Microsoft. .NET devs tend to wait for Microsoft to solve problems and develop tools instead of doing so themselves. This mentality however is changing VERY RAPIDLY. What is more the change is driven by the web guys. This have positive sides but it also have negative sides. We are losing the benefits of monoculture. You may be surprised to find out that the current .NET world looks much more like the Java or Python world than like the .NET world five years ago. This makes me a little bit sad. I was a fan of monoculture but if the market speaks I will shut up. Also note that Microsoft are slowly getting rid of the Not Invented Here syndrome and are embracing technologies like jQuery and git. Finally I would like to point out that having a big company sponsor the community has a lot of benefits. I cannot speak about the international conferences but in Bulgaria the .NET community has the best conferences not only in terms of attendance but also quality of the organization, content and speakers. I have attended and/or watched recordings of local Java conferences and Open Fests and the .NET conferences crash them in every possible way. I myself am speaking in the local .NET user group and the Java user group is in practice non-existent (although I am trying to help with that too). I would also like to point out that it is
Telerik (a .NET company) that sponsors a lot of free courses and releases video trainings online for free (in Bulgarian). Where is the equivalent for competing technologies with their great communities?
To sum it up - I do not know if .NET is worth the "price". If it was so obvious the great amount of competing technologies and their communities would not exist and everyone would unite around a single one.
However I can speak about my personal motivation for choosing .NET and it has always been the C# language. My interest in other technologies is centered mainly around languages. I do not find algorithms and frameworks that interesting and I outright despise processes and methodologies. I am passionate about languages and I find C# beautiful and a work of a genius especially compared to other mainstream languages. Every time I find out why something works in some specific way I am amazed by the thought that went into the issue. When I look at other languages I often find myself thinking "they were clever guys but they could not have known this was a bad idea back then" (Java) or "what else can I expect from a language that does not have specification after fifteen years" (Ruby). The only mainstream language I have found so flawless is C (note that I do not think C is enough and the C++ extensions were needed but what is in the core of C has very few flaws). When I work every day I want to get excited. Since I care more about languages than other aspects of programming I made a choice based on the language. Some people may get excited about the open source culture and choose based on this. Others may like well designed frameworks and this may drive their choice. This is all fine and valid but this is not what turns me on.
So tell me why do YOU choose or not choose .NET?