views:

1993

answers:

7

I have heard that they are mainly similar and competing technologies, and it is mostly an issue of skill and manpower availability. Do you agree or are there technological differences in:

  • Performance
  • Ease of development
  • Open source components availabilty
  • Tools availability
  • Community support
  • Hardware/Software compatibility
  • Other factors
+12  A: 

These are just my opinions, having worked on both Java and C# web apps:

  • Performance - probably similar between Java and C#, depending on what you're doing
  • Ease of development - I think ASP.NET is easier for developing web apps, especially for quick and dirty ones
  • Open source components - Java has more of an open-source community, but .NET is starting to get better. Microsoft provides a lot of powerful tools, but not necessarily open-source
  • Tools - Depends on what tools you need. Visual Studio is very powerful for web app developement, but Java has a lot of powerful open-source tools. Java tends to have a lot of XML configurations for frameworks/applications, which can be kind of a pain.
  • Community support - Similar - there are a lot of really good Java and ASP.NET communities
  • Hardware/Software compatibility - Hosting ASP.NET is usually more expensive than Java. Microsoft applications tend to run best on a pure Microsoft stack, whereas Java is a little more flexible, and has more options for hosting.
Andy White
+2  A: 

There is an interesting thread here which discusses development time of asp.net vs. jsp applications.

According to the comments, in terms of development time, (my opinion is also the same) asp.net seems better than jsp.

This one is also a good read that discusses why MIT chooses .NET over J2EE.

dincer80
Yeah, point to a 4 and 6 year old article to support your case. Noone in their right mind is developing with jsp/ejb for web in java anymore than someone is developing in VB for a windows app.Take a look at JSF, Tapestry or Wicket as examples of modern frameworks with Java. Hibernate for DB.
Mikezx6r
I just didn't have the time to write down my whole opinions (though they would end up with the same result because I'm currently a .net developer[also tried jsp/struts/etc before]) So, I've made a quick search for articles that could include comprehensive and useful information. Sorry if it's wrong.
dincer80
+7  A: 

I'm doing most of my work in ASP.NET. It's a fast (JIT), well-designed (API) and well-integrated (IDE, server) system with great documentation and community.

However, for a web application, I see one big disadvantage: If you eventually have to scale your application you will spend a lot on the licenses. If that's a concern, you should take a look at Java.

Java is quite comparable in these areas:

  • performance
  • hardware support
  • tools (VS.NET vs. IDEA/Eclipse)
  • community

Better in these areas:

  • a lot open-source components
  • runs on Linux or anything else

Worse in these areas:

  • JSF is a pain compared to ASP.NET control model
  • documentation is harder to find but once you get into it it's not an issue
  • ease of development depends on the Java framework you choose

Summary

  • ASP.NET would be my choice for an internal (intranet) application. The advantages are a quick prototyping (after your learn the platform) and easy changes.
  • Java would be my choice for a publicly available application that has even a slightest chance of growing bigger (despite some Java disadvantages).

In a bigger application, you will often find that you need to partially reinvent a lot of stuff anyway (the built-in controls are usually not flexible enough). The more complicated and user-friendly your application is the deeper you need to dig (loosing the advantage of the pre-built stuff).

Edit:

A few interesting presentations about Java Web apps:

Dan
I have to disagree on several counts: JSF is only one (of many) Web frameworks. It's not even the most popular (not by far). Also what's hard about Java documentation? Additionally, Java comes with the source code for the JDK. Whats better documentation than that?
cletus
1) JSF: I mentioned JSF because that's the only thing comparable to ASP.NET's control model (including WYSIWYG)2) DOC: That was my experience, especially when looking for EL and custom TagLib documentation. The general API (JavaDoc) is fine.3) I like Java for web development. ;-)
Dan
+1  A: 

I see both Java and C# are good options. However with C# and ASP.NET, if you do not follow the m$ way or anything you learn from ASP.NET books, you will be fine. Do pay more attention to the alt.net community. If you do follow the ASP.NET way you'll end up with unscalable, unmaintainable slow website/webapp. And there are quite a lot of bad asp.net developers out there who are titled senior developer. What they do is they repeat the same old crap way of making softwares and kept doing it for years then became senior developer. But I see the initial effect for getting an ASP.NET site up and running is good easy. My suggestion is for a quick and dirty one start with ASP.NET, see how things go and as you gain more experience/ideas with your site you can then make an better decision on which platform to go with. Or if your site if a public facing high trafficked site and you have quite a lot of resources then go with java. But in the end no matter which technology you choose it is up to whoever that's building it. if they know what they are doing and are experienced with the technology, the result should be very good. I do see one issue with Java is that you may end up spending a few months trying to pick the framework you want to use. LOL

Jeffrey C
I agree with your point about crappy ASP.NET "Senior Developers"
Andy White
+1  A: 

I think your question is more about frameworks than language. In the Javasphere you have a lot of choice between web frameworks, I'm not familiar with the .Net biosphere.

Jeroen van Bergen
+1  A: 

I prefer ASP.Net because of the tooling (VS beats anything else out there).

But if you want a lot of open-source stuff you will have to go for Java.

Regarding what Jeffrey said about unscalable apps; The original webforms paradigm is not great for large scalable enterprise apps (although it is excellent for quick and dirty sites) but like he said if you use the alt.net approach it is a very good platform.

For the last year or so ever since preview 2 I have been hooked on asp.net MVC. It has the best of both worlds. You get the comfort of VS and the ease of C# together with best practices like DDD, TDD, MVC, etc... I highly recommend at least checking it out as an option for any future web app. http://www.asp.net/mvc

Sruly
+1  A: 

This is what I think (only an opinion):

Both are strong technologies.

That said, I think Java EE is more complicated than C#/ASP. When you develop a project in, let's say, Java Server Faces, you have nightmares trying to figure out which libraries and Frameworks work with which App Servers. And you end up having lots of strange problems and issues not directly related with what you're trying to accomplish: BUILDING A WEB SITE.

On the other hand, C# and ASP.NET, being from only one vendor, and working only on one platform (Windows with IIS {yes, I know there is MONO, but for practical purposes you could assume that it only works with Windows and IIS}) is a more predictable tool. You don't get many weird errors related to incompatibilities among AppServer+Libraries+Frameworks.

Java's strong side is Open Source tools availability. There are a lot of frameworks you could choose from, and is available on several platforms. And you can even run a server without spending a dime on software base (JBOSS Community+MySQL) while that's not true on .NET side.

Pablo Santa Cruz