.NET vs Java

I have been reading about the Spring Framework, Hibernate and the Java world in general for the past couple of days. Trust me when I say I am reading about Java just out of curiosity and nothing else Smile.

Here is what I have learnt so far:
With .NET Microsoft took the approach of making it very very simple for developers from the get go. Most .NET applications feel like writing shopping cart applications Smile. They did not add any high level complex APIs and kept the entire platform very very developer centric and simple.

With J2EE Sun took the exact opposite approach and made the platform Enterprise level which resulted in developers having to learn EJBs which from what I have read required a lot more work to get even simpler projects done. This lead to the creation of the Spring Framework, which adds some neat technologies such as Inversion of Control and Aspect Oriented Programming to POJOs (Plain Old Java Objects). I imagine .NET to be like POJOs when I write code.

The end result is that these two technologies are moving towards each other (.NET scaling upwards and JEE scaling downwards in terms of simplicity) and are going to clash/meet somewhere in between.

I think the existing .NET 3.0 framework (which includes Windows Workflow Foundation and Windows Communication Foundation) and .NET 3.5 framework (which adds OR Mapper like Hibernate) right into the framework, while J2EE coming up with frameworks like Spring to simpify Java development is a good indication of this.


On the tooling side I was really surprised to read that Eclipse was more powerful than Visual Studio. I work day in and day out of Visual Studio and never imagined anything more powerful, but after reading some of the features of Eclipse I think we can be a lot more productive if VS had those features.

To name a few:

  • Refactoring: Hands down the refactoring support in VS 2005 is pretty lame and may be about 5% of what Ecllipse can do.
  • Type search. If you want to search for some class that is sitting in some third party assembly, you can find that just by hitting Ctrl+Shift+T and typing the first few letters. The tool will take you straight to the class if source code is available else will take you to the type definition.
  • Automatic imports statements: As you type your code when you reference a class that is not part of the using statements at the top, Eclipse will automatically add it. It will also remove those statements when your code no longer uses any of the classes in that namespace.

There are a lot more, but I forget them Sad. I will try to find the link where I read the differences and update this post.

Having said that I think the refactoring support in Visual Studio 2007 due this year end will improve dramatically. Just by the looks of it, it appears that MS just threw in basic refactoring into VS 2005 at the last movement. The beauty about VS 2007 is that it will target multiple .NET versions (2.0, 3.0 and 3.5). So you can write .NET 2.0 code in VS 2007 with all the productivity benefits they add to that release.


No Responses

Leave a Reply

Please enter all required information

*

*

*