23 points · by insraq · 13y ago · 82 comments
C#, ASP MVC, and Visual Studio are extremely good tools. I've programmed in C# for 10 years and never had a project I could not do quickly with it. It has very good support of 3rd party controls like Telerik, and there are lots of open source projects on codeplex, github, etc.
The most expensive part of software development is paying developers. Spending a few dollars on good dev tools or 3rd party controls is a very good investment and can save a lot of time.
Having managed both, I have to disagree very strongly. A GUI works fine when you want to manage one machine (although it's kind of a pain in comparison to SSH), but when you want to manage dozens, you need sharper knives. The tools available for automating devops (chef, puppet, etc.) are very oriented towards UNIX-based OSes. We have around 70 Linux machines in our production system today, and if I had to manage them through RDP and GUIs, I'd probably quit and become an alpaca farmer.
I think it's easier to manager a service on Linux that has one, or maybe two, text files for configuration. They often ship with every option available, even is commented out, and a little note detailing exactly what the option is for.
My only real experience with Windows Server was having to add a new mime type for .fla files for IIS. The .fla were downloading instead of playing. The option was buried deep in in multiple configuration windows and dialogue boxes. It took forever compared to what a simple AddType would have taken in an Apache text file.
Honestly, admin on Linux is not that hard, and server most tools out there were designed for linux first, and Windows instructions are often of poor quality or lacking entirely.
I'm not advocating that anyone use Windows, just saying that in practice licensure isn't as hard of an operational problem as it might seem. The price still hurts, though.
If i were to do a big enterprisey project with a big budget i would definitely be more likely to go with windows while if i were to do a web/online start-up i would more likely pick Linux.
But really big enterprisey stuff with really big budget? It's all Oracle DB + Java on Unix there.
Just as all the really big infrastructures (Google, FedEx, Amazon, etc.) are all Unix.
You can script practically anything using powershell and multi server management using powershell remoting.
System center + ad group policy is light years ahead anything else.
Configuration and management on Linux is anything but standardized, but it's almost always as simple as changing the right line in the right file in /etc. Also, the ecosystem is so large and mature that tools have been built to make things simpler.
You can manage Windows machines via PowerShell, but that doesn't mean it's easier in practice than SSH and Linux -- particularly given the toolsets (Chef/Puppet/etc) that have been created around it.
After a significant amount of experience in the .NET ecosystem, I believe the majority of the anti-Microsoft sentiment is well-deserved. At one point, there was a lot of innovation in .NET OSS, but it seems to have ground to a halt within the last few years. It's possible I'm just projecting because of my own experience, but it seems like many of the more influential members of the .NET ecosystem have gone on to do other things.
It's not that Microsoft or .NET is bad -- it's just that there are better options.
I think the biggest problem for me isn't some attachment to Windows Server (I much prefer working on a Linux server), or some misplaced love for WebForms (ick!), but the C# language in general.
There are a lot of great dynamic language setups on Linux (Rails, various Python stacks, etc) which aren't bad or anything... but I always find working in a dynamic language to be a bit of a hindrance. I've been writing a multiplayer game server in Go, and I can't even begin to list the hours of work compile-time type tests have saved me during early development as I constantly refactor. But on the other hand, I wouldn't want to write a large "business" style web-app in Go (my day job), which really doesn't have a standards library tailored for it.
I also get the feeling that the dynamic language web-stacks suffer from relatively poor performance compared to the CLR, and for some of the clients I work with who need to do some fairly complex non-database processing, this wouldn't be a great thing. Maybe this concern is unfounded though.
Perhaps Java is the closest match to .NET, both in style and in spirit. But having done a fair amount of Java development for Android, Java just feels so clumsy and clunky... The language isn't as nice, the tools aren't as nice, and the standard library just doesn't compare in terms of letting my express myself quickly and easily.
When one of my clients needs a web-app, I always go .NET. These projects won't ever be scaling to millions of users, so server licensing really isn't an issue. On the other hand, there will be lots of direction changes no matter the amount of planning, so static typing can be a God-send with the safety blanket it provides. And C# really lets me write clean code more quickly than in anything else I've worked with.
If I we're creating a product for a start-up, I probably wouldn't go with it... licensing costs would be an issue. But then again, if I was running a start-up, hopefully it wouldn't be a relatively boring business-app that was best suited to something like .NET. And if I were creating a product for a huge number of users, it'd be worth pouring in the development time to have a super high performance back-end in a language separate from the quick-to-add-features-to Ruby front-end.
But for my use case, I just haven't found a better option yet. I'd love some suggestions though, because I'm not a big fan of Microsoft these days and wouldn't mind being less at-mercy of their platform. Maybe my concerns are unfounded though, and I'm just stuck in what I know, but I do branch out a lot for personal projects.
That's not entirely true. Pretty much the entire ASP.net MVC stack has now been open-source. Entity Framework is also open-source.
I agree, 3rd party OSS ecosystem is much smaller than Java.
No, there are better options for you.
I have to disagree. Windows Server has the illusion of ease, but the same mechanisms that guide your hand in the early days turn into a major hindrance later on. There isn't a Windows server running anywhere that doesn't have event logs jammed full of potentially deadly warnings and errors, and most "easily" setup Windows servers are setup insecurely and wrong.
In my personal experience (and I have a lot of experience with both) I've always found Linux build outs much more predictable and easy.
As to the "counter culture", that goes back to when Microsoft really were the pricks of the technology world. They've gotten much better, but it's hard to shake that.
We can also use virtualisation everywhere, for testing, quick deployment, offsite deployment, cloud... without worrying about licenses.
The fact that EC2 Linux is significantly cheaper than Azure is just a bonus.
I was surprised to find out that the recently released Playstation Mobile SDK is based entirely on Mono, so Playstation Vita runs it.
And I am pretty sure there's an implementation available on Android. As for iOS there's Xamarin. MonoDevelop on MacOS is also quite good.
Our application was originally built for .NET (on Windows). It was successfully ported to Mono, but we continue to have strange problems (machine load average going to 50+ and becoming unresponsive, etc.) which we believe are related to the Mono GC. After spending a good amount of effort trying to fix the Mono version, we decided to bite the bullet and migrate to another platform (Node.js), which has proven to be significantly more stable under load.
I'm a huge fan of Miguel and the rest of the Xamarin crew, and I'd love to see a universal implementation of the CLR take dominance. I think maybe 5 years ago the CLR had a real chance to win in the battle of multi-language runtimes, but at this point I think the war is going to the JVM. (Chalk that up to yet another short-sighted decision by Microsoft.)
The problem is that Java (the language) completely dominates the JVM landscape still. I don't see Oracle in the game at all as far as contributing/endorsing something else, and obviously Sun was completely oblivious to anything else until it was too late in the game for them.
If you look at the CLR, VB.NET has and F# actually have significant percentages of uptake because they're actually supported by Microsoft. Scala, Clojure, etc.... are just miniscule blips on the radar in comparison.
I think that's pretty much wrong.
Despite Microsoft shipping F# support in their main IDE, pretty much no one uses it. Can you name one popular library which switched from C# to F#?
Compare that to e. g. Scala: Huge amount of adoption compared to F#, despite _not_ shipping with any IDE by default. One of the most popular Java web frameworks switched from Java to Scala recently.
Even the F# “elite” is aware of it and complaining about how Scala has a a lot higher adoption (and a larger ecosystem and more developers, libraries, conferences, user groups, support, ...), so I'm a bit surprised by your statement.
Overall though, Microsoft is trying to move to an "ecosystem" platform. Exampes are Nuget powering their closed/open-source ecosystem for projects and Azure server templates. Even their latest ASP.NET MVC 4 is pushing several open source libraries onto their default project template. They truly see they couldn't win the web battle with WPF/Silverlight as their only options, so they are going for a different angle here in the last year. Additionally, a lot of interesting things are coming out of Microsoft and its employees, such as the open-sourced SignalR which is actively being updated and may become a standard for C# webapps.
I realize C#/.NET is not the go-to language for small web-apps yet, primarily due to licensing, but give it time. I say if you are on the fence, and are interested at all in C#, give it a shot! There are many free options for development IDE's and hosting provided by Microsoft. For example, you can use Visual Studio Express and host up to ten websites for free on Azure.
Jetbrains also makes IDE's for Ruby and Python; Rubymine and pyCharm.
(new Func<string>(() =>
{
return "foo";
}))();
That's pretty awful and as a result you rarely see anyone doing stuff like that, whereas with JavaScript it's used regularly. But for C# it's another checkbox that they can say they support.C# should stick with trying to be the best statically typed compiled object oriented language.
() => "foo"
Please don't participate in a conversation if you aren't willing to spend the time necessary to gain a baseline level of understanding of the topic.That it simply returns a string with no logic and therefore can be written slightly simpler belays the point I was making. You simply don't see this type of code being used much in C# because it isn't idiomatic, yet it exists to mark off a checkbox.
var func = () => "foo";
func();
As far as "you don't see this type of code being used much", that's just patently false. Anonymous functions (particularly predicates) are the whole way you interact with LINQ.So I'll ask this: what's the equivalent example in Java?
new Func<string>(()=>"foo")();
(function(){return "foo";})();
Oh look - exactly the same number of characters. How awful. ()=>"foo"
?However, for me is still boring. It's not easy to explain and I am pretty sure is very subjective but I feel C# lacks of soul. In the sense that programming in C# isn't as fun as programming in Scheme or Python. Maybe is just me, but I don't use C# outside of my work.
I'm a C# developer mainly, and recently did a bit of Java development in Eclipse (Android ADT) and did miss some features of C#, but the languages are still very, very similar.
I think Windows is the major drawback to C#. No one with half a brain is going to write server software that only works on Windows. Desktop software? Sure... I wouldn't write desktop software in anything else (at least for mass market software). I admit to not having worked with mono, and I think it is kind of a catch-22 - if it's not a common framework, no one will write for it, and if no one will write for it, the framework won't get much love... which is a shame, because Java obviously is in dire need of some competition to spur innovation over there at Oracle. Using Java feels like going back in time to 2002.
NuGet might really turn things around; here's to hoping...
And these days I include RestSharp pretty much straight away if I'm going to be doing any HTTP calls, the native HTTPClient API is horrible. But even that's not got the greatest API, there's absolutely no good reason to have to declare a `RestClient` before doing a `RestRequest`, it's just a waste of lines of code. You always end up just writing a wrapper round it.
This does not contribute to the discussion.
It means that if you ever need to scale up, you'll have to buy more licenses. It prohibits unlimited, automatic scaling.
It's also the once a month embarassing ordeal with sites being down due to server reboots after another round of Windows Update.
I deploy lots of stuff to Windows-servers, but I can see why some people would avoid it if they can.
Once you step out of your little bubble, you'll realize what a stupid comment that is.
However, for cloud deployment, there are a lot of hassles with scaling on Windows, mostly due to licensing costs and hoops you have to jump through for that.
BTW, I write server software for Windows in my day job, so I'm not some Linux zealot who's bashing Windows for no reason. Windows is fine. Non-free licensing is not (when a good free alternative exists).
The Java library/framework is more complete and diverse than the .NET one, but it's actually improved alot for .NET in recent years with Microsoft becoming much more open source friendly, the ALT.DEV community, Mono, etc... The .NET community is much more comfortable with alternative not from Microsoft these days than in the past.
IMHO though, the JVM has a better alternative language ecosystem than the .NET one. Yeah, .NET has F# builtin to VS these days, but doesn't have things like Scala/Clojure (not first class citizens), Kotlin, Ceylon, etc...
And the irony is: .net was touted initially as a polyglot platform, whereas JVM has been primarily associated with Java only.
Sun was screwed because of factors beyond Java, but because of internal politics there, they never realized the full potential of the JVM.