Thursday, September 23, 2010

JAVA vs .NET Development

As far as I had to deal with .NET(popularly called NOT development) would like to publish some notes.
Well as a language .NET is quite good as Java of course if we are talking about the same business usage.
Some violations are cause of architecture desing:

1. interface should start with I - that is good idea for .NET cause it quite difficult understand where is the class where is the interface

public class Test: HibernateDao, Repository

HibernateDao, Repository - the possible combinations are {class,interface} {interface, interface}

2. Namespaces(in Java called package)

namespace PackageName {
public class A1 : AbstractClass, Inreface {}
}

Probably .NET designer thought was the more braces the better code. It's UGLY.
Compare with Java:

package PackageName;
public class A1 extends AbstractClass implements Inreface {}


3.The only thing that is really missed in Java is lambda expressions. But this is the other story. I want to have this option but with a good design, not like it could be post about closures.

4. The main pain in development is the IDE. WTF - was my first thought. Well the times of Turbo C are passed...for such kind development. The IDE is not intuitive and you have to know a lot of tricks how to work with it.

4.1 NUnit execution time - very slow.
4.2 SVN plugin - bugs with adding new item. So manual process.
4.3 ZERO library and dependency management.
4.4 ZERO refactoring support. You have to install additionally Resharper component which is NOT FREE. And it is in the era of AGILE(main artifacts: coding, testing, refactoring, collaboration)

5. ASP.NET MVC2 - is a STRUTS. It's out of box but 21st century outside.And this is the question is it good to have this option out of box or to have modularity like in Java.

Why .NET so popular.
I think the main idea is that because of clicky-clicky development(like embedding files). It became more popular years ago. It was hard to start study J2EE development without studying ANT, Tomcat - additional efforts while .NET had it out of box with samples. Yes JAVA was late in this case only with MAVEN2(2006) this misleading was fixed.