.Net does have two major downsides that kill it for me entirely (as someone who has used it for 15 years now): schizophrenic roadmap and deprecation, immature libraries. The deprecation means you can't rely on the longevity of the vendor's whims to build your product on. The library issue is a biggie - there are just so much more higher quality libraries in Java. The language matters considerably less than the libraries do when you want to get from A to B.
For me, the one thing that .NET has going for it is Visual Studio. Every time I've tried returning to Java, it is not the language but the dev environment that has me running away in horror.
I think the Achilles Heel for .NET is Windows - the only way using .NET to develop makes any sense is to use Visual Studio, and to use Visual Studio, you need to use Windows. And that's a hard sell for a lot of people - most people in the startup scene use Mac OS X or Linux, and one of the reasons why is contempt of Windows. In many ways, .NET is better than Java, but I can't seriously consider using it if it's tied to Windows.
I disagree strongly. I used .NET for years before jumping ship to Java. Guava and Apache commons dwarf anything available for C# at any price. I know because I went looking many times for libraries with similar algorithms and Bloom filters. .NET is pay to play and in most cases something similar in Java was free.
I also greatly miss native database libraries when I'm using .NET. a large number, maybe a majority, of open source databases have an outdated buggy port to C# if anything. I will never forget the hell of integrating Lucene with C# because the port is bugged and close to a decade old. This is par the course for .NET
MS has a huge problem with lack of open source support unless you're stuck on the (IMO archaic) SQL Server+ Windows server platform.
Microsoft has fallen many years behind the times. Having to get a multi thousand dollar license for a server OS and SQL database is a joke. Their VM support outside of Azure is severely lacking and support for containers is junk because they're not based on Linux cgroups like everyone else. Windows as a server OS is as dead as OS/2 was 5 years ago. Linux won, by a landslide, and MS is too proud to just deal with that. Their software is severely crippled in server land as a result.
.NET is far beyond Java as a platform for building languages though, and it's been that way right from the start. Reified generics, value types, structs, unsigned integer type support, intermediate language actually optimized for compilation. It's pretty nice.
For some reason Java people have a near allergic reaction to it though.
What sorts of things are wrong with .NET in your view? As someone who recently started working with it after using Java for years, it has been refreshing and largely enjoyable for me.
.NET is a pretty good implementation of a Better Java. It doesn't even suffer from some of the cultural problems of Java. (FooDelegatorHandleFactorySingleton...)
It is a thoroughly corporate ecosystem, though. The vast majority of .NET programmers are work-a-day IT department developers. There is a lot of deference to MS on tools, language features, and libraries. MS developers will tend to wait for MS to incorporate something into the official platform rather than creating open-source projects to fill the same need. (eg. ASP.NET MVC) Even Java is better in this regard. It's hard to imagine something like Clojure emerging from the .NET community.
It's tied to .NET at the hip - there are no 3rd party implementations (Mono is effectively dead, correct me if I'm wrong), it's development is effectively solely driven by Microsoft, and every few years you have to rewrite all your things or get stuck on EOL versions of frameworks or abandoned tooling. The community is also vastly different in that it does not (yet) value open source and many different implementations of ideas (ie. there's an official Microsoft way to do X and that's what everyone does).
C# might be a fine language, but it's coupling to .NET and Microsoft are kind of a liability.
Java has a ton of warts, and it's not the language I'd choose today. However, it's ecosystem is FOSS-first and is immense in size and scope, has numerous options for any type of library/framework (take a loot at HTTP clients, or logging frameworks, or web frameworks, etc), and while Oracle primarily drives development they don't get the de facto final say anymore. There's also many JVM implementations and many class library implementations - all with different pro's and cons.
Perhaps .NET will get there one day. It is, after all, relatively new at FOSS/XPlat.
I am looking forward to playing with .Net again. I used C# and .Net for my personal projects for years, but left it for Linux and Python a few years ago. As Microsoft has made it more open, .Net becomes an option again. Windows 10 even seems OK.
I would add one additional negative against Java though: Java is bureaucracy incarnated as code. The degree of over-engineering present in almost everything I've ever seen written in Java entirely turns me off as a developer.
- As a consultant if I am handed a .NET project, even if it's a ios, android, web app, or a wpf application, then I'm usually familiar with 100% of the ORMs/PDF libraries/GUIs/build systems/source controls/IDEs/web frameworks they use(excluding client side web). I can come up to speed and get running quickly whether it was built last year or 10 years ago. It's the exact opposite of the javascript environment where two different javascript apps have less in common than a ruby and python app. It also allows me to meet all my clients need well enough on one platform.
- Because of the previous item, it's perfect for enterprise which needs to be able to scale up and down teams internally.
- Tooling is built for ease of use and is amazing. A lot of tooling from my experience in the java world is more powerful but with much much steeper learning curves. Leading to far more specialization.
- Visual studio is a best in class IDE.
- It's not java. From a language perspective java is still playing catch-up.
Java is great, there are a lot of amazing open source projects on it, the big data story on java is far more compelling, you can write much better Android apps, and and large multi-department transactions financial/enterprise software. But it is in no way shape or form superior to .Net in all ways.
I've spent at least the last 10 years (including Uni days) writing mostly Java or .NET in some form or other.
I don't mind Java, I generally like using Java 8, but I would happily be writing C# instead if I could run it as easy in as many places. The syntactic sugar, Linq, the latest MVC framework, etc- are generally much faster to get moving in and don't require the configuration hell you can run into w/ Java.
However, as a guy who ALSO maintains the servers and deployment process for the things we build, I'll continue avoiding .NET until it can be built, archived, and deployed as easily as we do our Java based applications. I don't think I could even maintain a Windows Server now if I had to.
Way worse building, packaging and dependency management experience. Worse ORM experience. Making simple single-file executables requires way more ceremony versus 1-3 toggles, sometimes not even possible at all. A lot of small and large papercuts in places where Java simply does worse, more expensive interop and reaching performance ceiling is way more difficult due to lack of low-level primitives. Terser syntax especially the functional parts of it and more lightweight tooling in the SDK, a lot of ceremony around dealing with just making sure you dev environment works does not exist in .NET (as long as you don’t start putting everything into custom paths). Building a complete product is dotnet publish, running an application is dotnet run, which requires more setup and scripting with Java.
The problem with .NET is that Microsoft have a proven history of seeing the next shiny over the hill and dropping support for existing frameworks and libs while the "new and improved" framework is rolled out. See ! This way is better! Well, until the next better way comes up within a few years.
I know of teams who have moved to Java simply to avoid the churn. Many folks prefer the boring but stable Java ecosystem.
I'm not sure if .NET has a bad rap at all, rather I believe the onus is on the .NET developer to show it was a better choice than the alternatives that are more mature and flexible from a licensing standpoint.
I consult as a software engineer on various projects, frequently C# and Scala. C# is a fine language, and Monodevelop is continuing to improve, but I don't see any advantage over choosing a more 'open' language with a much more mature runtime (JVM) and an overall more advanced language (Scala).
I would like to know more too. Not being able to call java libraries is one of the biggest problems with .NET. There are a ton of java libraries that don’t have good .NET equivalents.
Isn't the biggest problem of .NET/C# that Java and the JVM are just too similar? Sure, some things are nicer in .NET-land, but is it worth the switch, which kinda locks you, or at least moves you towards Windows too?
There is absolutely no basis for arguing .net being behind Java, JVM or the ecosystem by 20 years. I am sure you are conflating the library advantage that Java has enjoyed. .Net is clearly going to give Java ecosystem fits in less than 5 years.
I really appreciate what I can do with .NET and I don’t do much care for the language that I need to use. Yes C# is nicer compared to Java and C++, but after many years with Haskell they all are nowhere nearly as ergonomic and expressive, which is fine. I’ve tried F# a couple of times but couldn’t get used to the OCaml like syntax.
Anyway, I favor productivity way over ergonomics. And my .NET apps are very robust and very easily deployed. Everything is perfectly well integrated. No surprises. Almost no sharp corners left. The DX is superb. The performance is great. It’s so easy to run. Time to delivery is good. And the most important bit - I don’t need to keep all the hidden Java traps in mind. JVM with its many implementations is an amazing piece of tech, but in my experience it appears as something overengineered and requires too much maintenance and fine tuning. Just like Spring, Hibernate, and many other components of a typical Java app.
reply