Why Choose .NET?

Why Choose .NET?
   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?
Tags:   english tech 
Posted by:   Stilgar
20:49 13.02.2013

Comments:

First Previous 1 Next Last 

Posted by   JOKe (Unregistered)   on   14:29 14.02.2013

Well... :))
First of all "Java user group is in practice non-existent" is not true :)  Maybe the Plovdiv Java user group is non existent blame ivelina :) however the sofia or the bulgarian java user group is very much existent :) Yeah sure we dont do BIG conferences like DEVOX (you know it is made by Belgium java user group not some company right? ) but this is just because .. well bad organization :)

About C# .. nothing wrong with it some things are indeed great (generics I LOVE them), anonymous types, linq cannot say I like it but at least I dont hate it the fact that Int32 is int and they are not different. However some things I really dont like extension methods(intelisense cant find them), the whole visual studio is fcking joke.. it is unusable mistake made by C++ developers and then translated using C# translator to the only real WPF app out there. Still JustCode (and yes ReSherper ofcourse) make it to look like the worst java free ide out there. How the fuck I can search for attribtues ? WHY it doesnt search in my hundreds of dlls that I have in the solution why it cannot find when I start type [MyCrazyCustomAt.. why autocomplete doesnt work.. it is fckign joke doesnt even have a simple C# language support things that are available since version 1.0 10 years ago but still ti is slower with each version ? WHY !?!?!@ ).

Anyway I believe the problem with all languages which are != then Java is that well maybe they are "too powerful" I mean they have too many features.. even delegates in C# ... I know delegate vs interfaces HOWEVER in C# you already have interfaces.. so shall you use delegate or interface for something make you think about something like : http://msdn.microsoft.com/en-us/library/ms173173(v=vs.80).aspx ... which well LEADS to MISTAKES.. in java there are only interfaces.. nothing to think of... internal - you should think about it (well it is good I like it but still)... shall you declare something virtual ? or not ? shall you hide ? struct or class ? and etc. you have to THINK .. thats the problem if you have 20 indian developers on the team and you are C# superhero (Stilgar) still you will make a crappy project.. IN java world it is not like that even if you have 10 or 20 bad guys the amount of errors they can make is not so big so even one guy can keep track and fixing all this mistakes.

I believe Java is going the C# way currently so as a language the pluses of Java will soon be removed if you ask me of course it will have other nice pluses but the simplicity will go away.

Also to choose a Java platform is because of something completely different not about the things that you said.
For example 5 years ago you are completely right sometimes monoculture is not bad some like it some dont and .net well it is monoculture so you know what you get now... you dont.. you have to use NoSQL you have to make hundreds of integrations with non microsoft stuffs you have to use IoC (microsoft have Unity but there is Ninject and spring .net as well) I mean you are no longer in monoculture at all.
The other problem is that the monoculture doesnt help anymore with the technologies and the cost ...
You said that the cost is the same - WRONG. in fact in both worlds C# and Java you will buy a server (IIS or SAP netweaver, Oracle WebLogic etc) in both worlds you will buy SQL server (MSSQL,Oralce) in both worlds you will get cloud maybe and who cares about visual studio it is not that expensive and as you said there is an express) HOWEVER THE PROBLEM IS THE OTHER STUFFS. What other stuffs you will say:
- you need a testing framework .. mbUnit Nunit etc.. in .net world there are many some of them are free, some of them are runnable from visual studio .. some are not here comes the first thing - you may need Test Runner or JustCode(JustTest) to run your tests !
- mocking framework .. some are free but maybe you will want JustMock which is not extra money just for infrastructure stufffs.
- source repository ? in .net wrold you need TFS .. in Java .. Git/ SVN its all free.
- to make visual studio useful and productive - JustCode and Resharper they cost a little but still
- Jira alternative ? well oki you may use Jira.. :) but otherwise you will BUY something like teampulse ?
- Integration server to make your builds .. you cannot download Hudson or Jenkins you need to BUY .. how it was called ... but you need some continuous integration service. again MONEY
- Components ? - it make sense to use some components a fancy nice components not available out of the box. In Java world there are many free ofcourse what if the company stop to support them well here is the hint THIS ARE FCKING components that you will use 4 of them ? you cannot support them yourself ? oki then write them.. I mean they are not SQL server or Indexing Service or IDE or Photoshop.. they are a bunch of JavaScript + C#/Java code... in .net world you need to buy them.

so as you may see actually the cost is BIG if you dont want a project which is made by one guy who want to share as much code as he wants who doesnt use any repository have 1 ide 1 plugin and use express projects.
Sure for small home projects and .net is maybe the same as Java now but for big ones.... for me the options are basically missing Java is the winner.

Posted by   Stilgar   on   14:51 14.02.2013

First of all I don't know why so many things that work for me don't work for you in Visual Studio. Probably you broke it. For example my VS is quite happy to auto complete attributes for me.

There are other false claims. In Java you do need to think if you should make something final. This is the same decision you make with virtual in C# only the defaults are different. To be honest I don't understand why delegates exist as opposed to interfaces. I've seen some super high level debates on the topic on the Java 8 mailing lists but it is too much for me. However I've learned not to doubt Anders's (Hallowed be His name!) decisions. Every time I did declare something in C# stupid I was proven wrong by actual things I had to do with code.

I don't know where you got the idea that you "need" TFS to work with .NET. I have never used TFS on a professional project in my life (and I've used SVN and git) though I've tried it for a personal one man project and I would really like to use it for team stuff. It is interesting to note that if you actually buy TFS you get some of the other stuff you listed (jira, integration server) and even more.

As I stated in the article with the current state of .NET I don't see it much different from Java in terms of open source and free projects. It used to be different but at least in the web part of .NET the monoculture is pretty much gone so I don't think one technology or the other can get an edge with this one.

And BTW a single Oracle DB license will pay for the whole .NET stack :)

Posted by   Guest (Unregistered)   on   16:57 22.02.2013

Basically you could summarize the article like this: I like C#, so you should like it too and by the way I make my living using .NET but that is totally irrelevant.

Posted by   Stilgar   on   17:17 22.02.2013

I wouldn't summarize it that way. More like "there are cases when .NET development is cheaper". The parts about C# are my personal motivation as a developer not as a decision maker. Of course a better language may reduce the cost of the project but this is just one of the points.

Posted by   Guest (Unregistered)   on   21:16 25.02.2013

I like C#, very clean, and now with Xamarin I am writing C# apps for iPhone, iPad, Android and full Mac Lion OS X, not to mention Windows of course. But more and more I only use it for my backend and use pure JavaScript, HTML, JQuery and wijmo controls for my front end, I write "zero" C# code in my web pages, I only talk to JSON Based WCF Services to get my data, and that and the database access is all C# code.

Posted by   Guest (Unregistered)   on   21:17 25.02.2013

Oh, and whoever said Visual Studio is a joke is just flat out wrong

Posted by   Mike Griffin (Unregistered)   on   21:19 25.02.2013

Here's a great reason to go with C#, one language, all platforms
http://xamarin.com/studio

First Previous 1 Next Last 

Comments on this article are disabled