I think that the one thing MS can claim to have done better with .NET is the fact that you can usually update the framework and notbreak your app. I have used several java apps that would break because I updated my java runtime. I don't really worry about that with .NET
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.
That's interesting, because my experience has mostly been the opposite.
On the server side, you can install whichever .NET versions you need and they will live together quite nicely. But you can only install one Java version, and updates randomly break things (that's probably not true in general, but that's how it seemed to me). And I can only remember a handful of issues that were caused by the .NET framework, we had constant reliability issues with Java.
Having lots of languages available is nice, but it's not a core requirement for a platform in my opinion. .NET has C# and F#, and they complement each other very well.
I haven't had any library issues with Java or .NET, so I can't comment on that.
My guess is that my problems with Java stem from lack of experience with it, and my success with .NET is because of my deep experience with it. So it seems likely that your perspective is for similar reasons.
I'm not really disagreeing with you - C# is later, has the benefit of Java being in its hindsight.
I don't know how Java does it, but .Net installs framework versions side by side (typically under C:\WINDOWS\Microsoft.NET\Framework) so changes to, say V3.0 don't affect apps that run on framework 2.0 at all. Thus breaking backward compatibility for anyone (small or large installed base, doesn't matter) is not an issue when rolling out a new framework version.
.NET is tied to Microsoft, so I'd avoid it 100% of the time.
Yes, yes. I know that Microsoft theoretically open sourced and ported it. However the way that this always works is that there is a base that can be written in, but anything non-trivial will have pulled in something that, surprise surprise, is Windows only.
I'm not sure what makes you think Microsoft have let .NET languish.
The .NET runtime and languages have been updated regularly with significant changes and improvements, and Microsoft themselves support C#, VB.NET and F# as "first-class" languages, as well as developing IronPython and IronRuby and working on the Dynamic Language Runtime project to ease dynamic language implementation. All of these equal or better Sun's support of Java.
There are also quite a few non-Microsoft languages based on .NET including IronScheme and Boo. .NET's CLR also supports tail-call optimisation, something the JVM doesn't.
Same here. The Java ecosystem has almost everything you could ever imagine needing so it’s a safer bet. Maybe it’s not as shiny but it works. I don’t understand why MS doesn’t provide the ability to call Java code from .NET. It would open up a lot of libraries to the platform. Right now there are a lot of libraries that are first class in Java but have either no or only half baked .NET ports.
Considering the language and runtime in themselves, I agree.
But they sort of missed the point of Java, which was that it was cross-platform, and a single Java package could be expected to run on a variety of hardware and OS loadouts with no changes (except maybe in configuration). Microsoft, at the time, wanted .NET to be closely tied to Windows, and though the base libraries were submitted to ECMA, to get anything useful you had to have Windows and Microsoft's Windows-only libraries. (There was Mono, but it was not compatible with Microsoft's stuff and few on the Linux side wanted to touch it.)
Things are changing, obviously, with .NET Core. We'll see if Microsoft or someone else solves for cross-platform GUI and other end-user concerns, where .NET has historically been strongest.
Whether that's "wrong" or "right" is a matter of opinion. But it's hard to argue with the fact that many more people seem to prefer Java's approach to Microsoft's. As to .NET's "insane under the hood" innovation, the platform is similar to what Java was about 10-15 years ago in terms of GC, JIT compilation and monitoring. .NET prefers changing the language, while Java prefers changing the platform. The two just have a different DNA. I've always felt that while there's a clear bottom-line "business" advantage to improving performance or observability, language features are almost always questionable because we can't find any evidence they make a real difference in practice. The main difference it seems to make is in the number of developers who vocally love or vocally hate a particular feature, and in giving a feeling of "vibrancy" to developers who perhaps sometimes care about their code more than about the program it's part of.
I would argue that .NET is better than Java, unless Java has gotten something like Linq since last I used it (which is entirely) possible.
For those who do not know: .NET is cross platform, MS has official documentation on how to deploy it in Docker, and it is MIT licensed.
And if you want to deploy a backend for your webapp the tersenes can now rival Flask - plus the compiler can cross compile it to any supported platform, even in a form that works without .NET installed.
And of course it has Jetbrains support through Rider.
Meanwhile .NET is only fully usable in Windows for many types of applications, because .NET Core and Mono don't support all the platforms that Java does and .NET Standard 2.0 does not yet cover APIs like WPF, Systems.Drawing, WCF, ADO.NET drivers for all relevant enterprise databases.
So it is not like everything is better on the other side.
Note that I do enjoy using both of them since their early versions.
I used to intern at MS and have used .NET platform for a while (on and off, including not too long ago doing a bit of ASP.NET, ASP.NET MVC, and Sharepoint for one-week project). I've used VS.NET 2005, 2008, and 2010.
I've also used Java for a while, the whole Spring MVC, JEE6, Eclipse, IntelliJ.
If you're willing to live in Windows OS platform, you should go with .NET, no question asked. Forget about tooling and everything else.
If you want more flexibility, more choices, etc, Java is your choice. (There's also Python, Ruby, and the rest but let's scope it to Java).
.NET culture is heavily influenced by the culture of Microsoft which means:
1) Less Open Source, More mISV (more "pay" products)
2) Windows/GUI, less command-line (has changed a bit but still not there)
#3 is important because MS makes money from tooling as well. When I was there, the internal chatter was "tool will be out of date every 2-3 years". Please make your own conclusion.
Some people said Java had this period of "sleeping" which was true. But during that time frame, we've seen TONS of open source projects that are very mature, battle-tested, and probably everlasting.
We've also learned a better way to write Java code (HN made such a big deal of Factories yet HN never acknowledge the best breed of Java code out there, it's a typical of a community like this anyway).
Thus that "sleeping" period is being used efficiently to stabilize things.
When it comes to tooling, Java beats .NET by miles. Java deployment packaging (JAR for library and WAR for web-app) is one of the best out there and it's been stable for many many years. (http://dirtsimple.org/2004/12/java-is-not-python-either.html)
Java build and dependency management tool is also far ahead of what the .NET has. Maven is far beyond NuGET and MSBuild (shrudder).
Integrating Java build with popular Continuous Integration server like Jenkins, TeamCity is waaaay easier than .NET.
Eclipse foster a good community of open source and free tools/plugins which put VS.NET to shame BUT BUT BUT experience may vary when using Eclipse. Eclipse is like black magic and moody: if somehow you're in the position that your Eclipse is stable, it's one of the best IDE out there.
Eclipse has its own built-in "app-store" that makes installing plugins sooo much easier, seamlessly, and faster.
m2clipse, a Maven plugin for Eclipse can perform the following steps:
1) Download dependencies
2) Download the dependencies javadoc (auto-complete will show the code documentation)
3) Download the dependencies source code (#1 only download the compiled code) if you ever wanted to "navigate to the implementation of a method"
It does this seamlessly without you breaking a sweat.
Tools like FindBugs and CheckStyle helped to improve your code hygine/style and EclEmma can tell your Code Coverage. All of these are free.
To put it simply, the Java community has a very strong Software Engineering discipline and continue to find better ways to develop whereas the .NET/C# community is either following Java lead or serving its own master: Microsoft.
I'm glad I'm out the .NET world because it was soo much limiting and "capping" your day-to-day productivity.
Disagree about C#/.NET "doing better" than Java (by which I think you mean more widely deployed). Java is nearly ubiquitous in big corps from Cisco to LinkedIn and everything in between. On the desktop, C# obvious wins, however.
But your point still stands: MS went from a standing start to a credible competitor, overcoming their early embrace-and-extinguish failures like Visual J++.
Yeah, .NET is an odd choice to praise for backwards compatibility.
.NET 1 -> .NET 2 was iirc a total break due to the integration of generics, amongst other things. Source code had to be rewritten.
.NET Framework -> .NET Core was another total break. Lots of .NET code that worked on Framework didn't run on Core at all and had to be ported to different library or required other changes.
The fact is, the .NET world has made moves that obsoleted lots of prior code several times. Java never has, unless you count the various boulders rolled down the hill at people using JVM internal APIs.
I just wish more company adopt .net instead of java, the new .net core thing is a game changer. C# is a good language, combined with the runtime that can run anywhere? it's even better. The thing is enterprise companies mostly went with the safe route which is java, or most that use .net are stuck in the old version.
Hopefully it will change for c#, MS needs something for startups / enterprise / new dev to excite them to choose .net core! (despite all the bad things in the past)
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 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.
While I might not be the best as I just joined using .NET for an open source application 2-3 years ago, I did just convince my boss to let me rewrite our (really crappy) Java application with a new version (to enable her 2 year vision) in .NET.
Spring boot vs .NET is pretty similar, they both offer DI, Filters, Middlewares, etc. The ways I really proved to switch (given my development team is usually freshers) is to showcase the power of the Identity framework, LINQ (especially with EF Core and the ability to still use Raw Queries), and just overall being easier than Java (LINQ methods, extensions, syntax sugar).
Another big one is how damn easy it is to update and the performance posts MS does with the improvements. So you literally change one line in simple web apps and get performance boosts. Java doesn't really have that PR and the language (imo) is very verbose and painful to use (like their stream API).
All in all, we are building our rewrite in .NET (and Angular 17) and my team and I couldn't be happier.
reply