Matt Hughes asks:
"When does one programmer's preferences (Java over Microsoft-anything because they hate Microsoft, or Microsoft over open-source because open-source is evil) and the variety of choices start to erode productivity? As a J2EE developer for the past few years, I admit that I've become frustrated at the number of choices out there. Every one offers a different way of doing things but they don't all interoperate (JBuilder doesn't natively understand Struts) and none of them -- in my experience -- pulls all of the web technologies together very succinctly. Does Visual Studio .NET and the .NET framework pull this together better than the open-source projects out there, or is it just as complicated in your experience? Is .NET too immature to be trusted? What are your thoughts?" For those interested in the raw performance numbers, Slashdot did a
performance comparison between the two technologies, in an earlier article.
"I've recently been asked to produce a report listing the pros and cons of J2EE and .NET as a web application development platform. I've been using J2EE for years now and haven't even touched .Net as I dislike most Microsoft products. However, for the report, I am trying to be objective. From my own experience and from what I've read, it seems the defining issue for some people is choice.
As far as language preference, some argue Microsoft allows too much (VB.NET, C#, and supposedly everything else *eventually*) and J2EE too little (Java). As far as development environments, Microsoft offers too little (Visual Studio .Net, Windows Server 2003, Windows only) and J2EE
provides too much (JBuilder, Eclipse, Tomcat, JBoss, Websphere, any OS/hardware combo, etc)."
I think letting "I hate Microsoft" or "I hate open source" sway your decision is unprofessional (besides -- do people really hate open source? I don't even think Bill Gates *hates* open source, he just wants to keep his market share). Rant and rave one way or the other on Slashdot all you want, but make your business decisions based on facts. There are plenty of pros and cons on both sides.
.Net than open source in general, I'll get to the point.
.Net (C# in particular), and a lot of general development. From this limited perspective, here are my observations:
.Net. Both have roughly similar execution speeds (both have decent JIT engines under the hood). Most performance differences in benchmarks will probably be found to be due to the quality of the benchmark code or the quality of the libraries (such as database drivers) being used. I know that Microsoft has gone to great lengths to optimize their database drivers, and a while ago some benchmarks were posted that showed some significant advantages to their drivers. Perhaps Java has caught up since then -- I don't know.
.Net only has one decent IDE, and some people don't like it, but it gets the job done well. There are side utilities that fill in any gaps left. I don't have as much experience with Java IDEs, but I'm sure they are also decent, but that there is no one single IDE that makes everybody happy. Since most workshops have to pick one IDE for the team to agree on, somebody is going to be unhappy no matter what, just like some people might be unhappy with the Visual Studio IDE.
.Net supports multiple languages, but I suspect that most workshops will only make heavy use of one or maybe two. It just gets too complicated otherwise. The nice thing is that no matter what language you pick, you can access the same support libraries. But the more important question is which language is better for your purpose -- Java or [whichever language you decide to use].
.Net hasn't been around as long. And whi
Variety can definitely erode productivity. At work, I have to keep up on the Win32 API, the Windows CE API, C++ (with ATL, MFC, and STL), C#, Perl, 2 variants of SQL, makefiles, with some VBScript and JavaScript thrown in for good measure. At home, I try to keep up with the FreeBSD API, 2 more variants of SQL, PHP, Java, a different structure for makefiles, etc. And the alphabet soup doesn't seem to be getting any better.
Open source seems to have a tendency to have several projects around a given problem (MySQL, PostgreSQL, FireBird, SAP databases), while businesses tend to lead to bigger, more fully featured (also called bloated -- depends on your point of view) products (SQL Server, Oracle, DB2). Performance varies by application -- for jobs that don't need the extra features, sometimes the simpler products are better. And sometimes, open source results in a real beast (Mozilla). Java is somewhere in between I guess. But since the question was more about Java vs.
I haven't used Java much for web apps, but I have done some general development in Java. I have done some web development with
The performance benchmark you linked to was pretty meaningless. It seems to have been funded by Microsoft, so that just might have biased the methodology a bit. Nevertheless, I think there are some general gut feelings that I think are reasonably accurate regarding the performance of Java and
As far as IDEs go, I'm not sure why "choice" in this matter is really an advantage.
As far as language goes, I guess it is nice that
I personally like C# over Java. Things like ref and out parameters, boxing, and attributes are things that are quite simply missing from Java. They are needed, and they aren't there. Obviously Microsoft took a lot of good ideas from Java, but since they got to start over with it, they got to improve on the parts of Java that drove Java programmers nutty.
On the other hand,
Time flies like an arrow. Fruit flies like a banana.
Several times recently we have had opportunities to have contracts with public shops, like governemental agencies and the like.
.NET, microsoft, sqlserver, licencing ??
They all sent us loads of papers describing what type of architecture they expected, and what rules we'd have to follow. What they all want to ear is : open standards, evolutivity, free (as in beer) libraries, maximum portability, and connectivity.
Now, guess what they like to hear between J2EE, jakarta libs, JNDI, linux, or...
It seems big shops really start to get the point about the advantages of open standards.
(Note : I'm talking about french agencies, it might not be true everywhere. But I suspect most european countries are following those lines too.)
I'm a little concerned at the way the question conflates open-source with J2EE. Java can be used in an open-handed fashion but it is not inherently open. Certainly J2EE is not though JBoss gets props for trying.
Anyway, why take the pill? If you don't like the infrastructure, build and borrow the tools you need. It's not rocket science, as much as MS wants you to fear its complexity. A decent controller and a quality markup regime and you can do *web services* as you see fit on top of Tomcat.
illegitimii non ingravare
This is just plain incorrect. J2EE is not over-architected. Have Sun and the various Java vendors done a really crappy job of providing "How do I get from A to B" info? Yep, but it's not over architected. In fact, the core J2EE libraries don't have much in there that isn't necessary.
The thousands of classes are necessary when you want to deploy portable, clusterable, scalable components. The trick is, how to not write all that by hand. I personally haven't written any of those classes by hand, or maintained the XML descriptor files needed in over a year. I use XDoclet to manage that. It's portable between IDE's and supports almost all the containers available. If you're application is portable between IDE's (in other words, you used Ant to build it and didn't use weird wizard things that store meta-data in the IDE somewhere), then incorporating tools like XDoclet shouldn't be an issue.
I write one class for an EJB, I add XDoclet tags that generate it's Local and Remote interfaces, Utility objects, Value Objects, XML descriptors and SOAP descriptors. All in one file, so where's the bloat?
The XDoclet paradigm is going completely mainstream in Java 1.5. You can go look at it on the JCP as JSR-175.
The Petstore comparison doesn't hold any water anywhere. If you are designing webapps the way the Petstore projects were built, you need to find another profession. The original Sun Petstore was built as an example of how to get basic stuff working, not a working example of how to build enterprise apps. It was used as part of a short tutorial where they wanted to demonstrate every J2EE technology in one bang.
.Net Petstore was a cheap shot at Sun. Rickard Oberg, who started the JBoss project and the XDoclet project has written extensively on why both are crap and Microsoft was pulling a fast one. Frankly, I haven't looked at the Sun Petstore stuff in several years, because it's useless for doing real work.
The Microsoft
Sun has a long history of great technology, but they couldn't market themselves to save their life. Seriously, how many people know what the hell, the benefit of SunONE is? Sun's software strategy appears to be a world of contridictions.
If you want to do J2EE, don't ask Sun how to do it. Go to the Open Source Java community. These are the guys that are innovating. They see the holes that Sun has left and have gone and plugged them.
If you really wanted, you could write your next webapp in the same way Microsoft wrote their Petstore, load the entire database into memory, t
Arrogance is Confidence which lacks integrity. -- me