tags:

views:

334

answers:

5

I've started looking into a few larger server-app frameworks that would be able to support desktop client interfaces as well as web interfaces, and have really zero'd down on the two obvious ones: J2EE and .NET. From a language standpoint, feature standpoint, portability standpoint, etc...I am pretty comfortable with my understanding of the two products. I'll keep it simple in saying that for the most part, either would fit the need well enough based on my initial analysis.

Where things are a pain though is in finding a good comparison from engineers who have spent a better part of the decade working with one, the other, or both. The undocumented frustrations that youwont get from Sun, Microsoft or a book.

A Google search turns up plenty of results, but most are from 2002-04. Suffice to say, plenty has changed since. J2EE is suposed to have gotten a lot simpler and .NET is supposed to have gotten a lot more feature rich.

Is anyone aware of more current comparisons (in the last two years) that might be worth reading?

+2  A: 

Java EE has certainly changed a lot. The biggest changes that you'll want to be aware of are Spring and the new EJB3 spec.

Spring is not part of Sun's Java EE standard. It's the crystalization of Rod Johnson's consulting experience into a framework for POJO development that's gotten a lot of traction. And, just for reference, there are versions of Spring for both Java and .NET. Likewise for Hibernate, a popular ORM tool.

EJB3 has taken a great deal from Spring and Hibernate. You can use EJB3 with Glassfish or JBOSS or WebLogic.

Another idea that you'll want to keep in mind is web services. These are distributed web components that can work with any client, Java EE or .NET, desktop or browser. I think their chief benefits are the emphasis on messages and hiding the back end implementation details. If you write web services, your clients don't have to know or care whether they're written in Java or .NET.

Web services work well with rich Internet clients like Flex and Silverlight. They can help to keep your options open.

Sorry, I can't speak from personal experience about .NET.

duffymo
+6  A: 

Since you say 'desktop' before you said 'web', i can assume that the desktop side of this application is more important. .Net has a definite advantage in making desktop apps, Java really doesn't have this as an advantage.

Having said that, i'd just go with whichever your dev team has more experience in.

Chris
A: 

This is a real "apples and oranges" type question.

Generally speaking I'd rather do desktop development in .Net. If I did it in Java I'd probably favour Eclipse SWT or Netbeans RCP over Java Swing.

For serverside programming you can use either. I'm not a huge fan of Windows as a server platform (over Linux) and the Java stack is essentially free, which is particularly useful in terms of start-up costs (Bizspark notwithstanding).

The biggest thing about Java server apps isn't really J2EE anymore. It's Spring. You'll probably find more Java web apps running with Tomcat and Spring than you do full J2EE stack apps (generally meaning including EJB).

EJB3 has gone POJO like Spring is.

cletus
A: 

It sounds like the development will be on the server-side, supporting web application clients and desktop clients, probably from a webservice.

Otherwise J2EE running in Swing just wouldn't make much sense, and .NET would be a better choice for a GUI application on the desktop.

But, if you want do a webservice type application, perhaps with some cgi, such as codebehind for ASP.NET or servlets, then it is easier to compare.

Spring is fantastic, and works fine in both .NET and Java, and with it J2EE isn't really needed. I am curious if you mean J2EE or just some Java application.

I have never tried to run a .NET project under Tomcat or JBoss, but with mono it may be possible, but, a big issue is which webserver do you want to use, or more importantly, which won't be used. For example, if you are not comfortable with IIS then .NET may be a bad choice.

Visual Studio 2008 makes development of dynamic webpages and webservices (using WCF) very easy to implement.

Eclipse and Netbeans makes it easy to do the same for Java, so again, it would depend on which IDE you may want to use.

If you don't use Spring, but want to use AOP to remove common code from your functions then Java has much better support for AOP, using AspectJ, than is present in .NET. Eclipse has great support for AspectJ also.

The same applies for DI, if that is important then I found some of the libraries in .NET harder to set up, and more limiting, than in Java.

If you want to use functional programming for parts that make sense then you would be comparing F# to Scala if you are not coming from FP as a LISP programmer, and there are many differences there.

My point is that there are many features that can be compared, so it would be helpful if you listed a grid of features and how important they are, so that people can help with the comparison based on your priorities.

James Black
IntelliJ's support for Spring and Hibernate is unmatched. You have a pay a little, but it pays for itself quickly.
duffymo
I have never used IntelliJ so I just go by what I have experience for. There is a nice plugin for Spring for Eclipse that I have found useful. My main interest is in AOP though so Eclipse is the best IDE for my needs.
James Black