Java vs .NET, I am no longer ambivalent

I’m not one to take part in flame wars. Luckily very few read this blog, because I feel compelled to go on record with the following statement:

“No developer that is proficient in both modern Java and Microsoft .NET, would choose to use Microsoft .NET for building new backend type systems.”  – Me

So it’s perplexing to me why there seem to be so many .NET based companies, at least in the local area.  I understand that using what the development team already knows and has experience with will trump most other aspects, especially in an environment that has already standardized on the Microsoft platform.  However, I don’t understand why more .NET developers don’t even try looking outside-the-box. I think they’d be amazed.

Not that long ago when interviewing and trying to win new consulting work, I would say that I was ambivalent to actual platform.  That was of course key to finding work since most environments already had chosen their platform, but I was truly proud of that way of thinking. I really didn’t care. I just wanted to build cool things and either platform made that possible to the same extent.

That is no longer the case. In fact, now if a team tells me they are using .NET, I will likely try to avoid working there.  .NET gets in the way of building cool things.  It’s not that it can’t be done.  (See stackoverflow for example.)  It just can not be done as quickly or as efficiently or to the same degree of excellence when using more modern techniques and tools.

It’s difficult to have a real discussion on this because very few developers have worked on both platforms in any real capacity (much less the alternatives like RoR, Grails, Node.js, etc).  It is also developer nature to have a strong bias towards whatever it is that was learned first and/or known best.  I consider myself one of the lucky(?) few to have toggled back and forth on these platforms a few times over the past 10 years, but I know I am biased as well no matter how hard I’ve tried to evaluate .NET objectively lately.

Here are just few of the reasons that I’ve become more set in my ways:

  • Visual Studio is not nearly as productive as Eclipse, IntelliJ, or Netbeans.
    • I’ve been using VS 2012. From a pure UI performance perspective, 2010 and 2012 seemed like a step back.
    • With VS, it’s basically required to also purchase ReSharper. Even with ReSharper, the refactoring support doesn’t compare to that in the major Java IDEs.
    • VS is simply slow. This still surprises me because Java GUIs are not known for their responsiveness, and yet they are more responsive than VS for many operations, especially when using contextual navigation.
    • It really irks me when the VS UI becomes unresponsive (which happens often) while it does some other task. Some other task that should’ve been a background task not blocking the UI.
    • Coming from Eclipse especially, with it’s constant compiler, having to constantly save and build in VS is painful.
    • The VS continue-and-edit capability is weak when debugging ASP.NET apps. It provides a fraction of the features available with the standard JDT.  And much, much, less capability and efficiency if used to using JRebel with Java …especially on larger web type systems that take a while to start.
  • All of the useful .NET development utility type libraries feel rough, incomplete, and generally just way behind the Java equivalents.  Some examples include NuGet vs. Maven, Hibernate vs. Entity Framework, and Spring IoC vs. Ninject.
  • The .NET development community as a whole (and I’m generalizing heavily here), does not seem to have enough experience or sufficient background in building robust systems.  While there are bad developers everywhere (and probably even more in the Java camp due to larger community size, age of the platform, and a bias towards stagnant enterprise environments), what I’m referring to is the difficulty in finding good information and best practices online.
    • As just one example, it is very difficult to find definitive information on how to use transactions correctly in Entity Framework on ASP.NET MVC project.  Most .NET developers I’ve come across seem to assume that everything works out-of-the-box.  And in the case of not knowing your actual database transaction boundaries, it does work …most of the time.

Looking over this list so far, I’m not sure it’s really indicative of why it is I no longer enjoy using .NET personally though.  Maybe it’s the  little things. Like being able to attach a remote debugger to a runtime instance and profile with jVisualVM, or that there’s access to all sorts of excellent libraries like Apache HttpClient and Google’s Guava. Or that the Java concurrency package is light years ahead of anything in the .NET framework.

I’m not an Oracle fan.  I actually despise the company and their database. And I’m no Microsoft hater.  I have a significant interest and likes for many things coming out of Microsoft.  Also, note that I really have no concern for costs. (Though why, given all the above, companies choose to pay large amounts to Microsoft without at least a long-term objective intending to move off that development platform is beyond my intellect.)

If the developer horde did read this blog, then I’m sure I’d gets lots of comments of the sort “java sucks almost as bad as .NET you old timer. use <new-awesome-platform> instead”.  I’d refer those people to the excellent post by Zef, “Pick your battles“.

I simply want to build cool things that get used by real people who probably don’t care about the underlying technology. Better. Faster. Reliably.  For that reason, I no longer want to work with Microsoft .NET.

Alas, on Monday, I will once again head in to an office to do, you guessed it, work using .NET.

This entry was posted in Miscellaneous, Technical. Bookmark the permalink.
  • Micah Zoltu

    Not arguing, just wanted to clarify a couple points: “VS is simply slow” and “It really irks me when the VS UI becomes unresponsive” are both caused by ReSharper, not Visual Studio. I have stopped using R# because of this. Currently, I’m hoping that once Roslyn comes out we’ll see better refactoring tooling.

    Re: Having to save and build, I recommend nCrunch. I almost never build anymore since nCrunch is constantly building *AND* running my tests in the background and giving me almost instant feedback. I have yet to find a comparable tool for IntelliJ IDEA (not sure about Eclipse).

    • kaliatech

      Thanks for the comment. Next time I use VS, I’ll definitely have to try disabling ReSharper.

      I’ll also check out nCrunch. Since writing this post, on almost every project I’ve been on since then, I’ve used IntelliJ. I still miss the automatic incremental compile of Eclipse (for Java development), but I’m slowly getting use to save/build keyboard combinations. On most other fronts, IntelliJ now soundly beats Eclipse.

      The one area I still did prefer Visual Studio was for Windows C++ development. So, I’m looking forward to evaluating JetBrain’s new CLion when it becomes available.

  • Ryan Mann

    It sounds to me like you haven’t spent much time in the .Net open source community. There are a TON of awesome things on NuGet now days… But don’t use VS2012, use VS2015… VS2012 was by far, the worst IDE Microsoft Ever made imo.

    E.g. I can use Less and Scss in .net without installing Ruby/Compass. I can do automatic JS/CSS minifications to, with System Web Optimization. Then there is MVC 5 and WebApi 2, and Razor Templates, and oh SSDT Projects (Sql Server Data Tools), and things like PetaPoco (Micro ORM), and tons and tons of video codec libraries “e.g. I can grab a thumbnail from a video at a specific timeframe with 1 line of code”.

    I build cool things all the time, and I do it on .Net. Even cross platform (run everywhere) games, e.g. MonoGame/XNA Studio, or even c# in Unity%…

    And now that .Net Core 5 is out, I would expect to be seeing a lot more of .Net, and on every platform.

    Also, I dislike using Java for most of the reasons you dislike using .Net, so I guess its to each there own, personal preference based on Experiences.

    • HaakonKL

      Mate, he wrote this in 2013. you wrote your reply in 2015. So I’m now going to tell you in 2017, that he couldn’t have been using MSVS 2015 in 2013…

      🙂

  • bushed

    Not sure how I found myself here, but here are some food for thoughts (in no particular order).

    VS2010 and VS2012 are bad..
    VS2013 is much better already, VS2015 looks like a finished product (e.g. Nuget is much more useable in VS2015), still has some rough edges in new features though.

    Same goes for resharper: v9 is quite polished, wouldn’t recommend anything below that. Turn off css parsing if it gets too annoying. Turn on solution wide analysis if you want it to be more like IDEA.

    Overall performance – make sure you have an SSD and 16gb ram.

    Regarding remote debugging – .NET does support it if you install a debugging service on the target machine. If that sounds like too much – have you tried debugging a memory dump? VS2015 has excellent support for memory dump debugging (save dump from task manager, open file in VS).

    NCrunch is really awesome, can cause some problems on large projects though – will require tweaking.

    Ninject – is a disaster IMO (e.g. google performance comparison of .NET DI frameworks): everyone uses it because everyone uses it. Try to pick something else.

    Hibernate – you can always use NHibernate if you want to be comfortable with transaction management. EF is different and that is often forgotten. Use Dapper if in need of a short learning curve.

    dotPeek – I somehow doubt there is a comparable tool in Java (IDEA included) – take decompiled sources debugging for an instance
    Going a bit deeper into reflection: Mono.Cecil is the best
    Even deeper: search youtube for “LayerOne 2012 – Jon McCoy – Hacking .NET”

    Regarding concurrency support – there are some 3rd party libraries that would help with primitives (e.g. AsyncEx).

    Now there are things now like async/await, .NET Core 1 – in my opinion still a bit raw and tooling is no yet there (try profiling async heavy code). Quite fun though.

    In terms of future for .NET at this point I’d say it looks good, I am quite optimistic about both .NET Core development and Xamarin purchase.