What is the difference between JEE and NEET

.NET or Java? - A decision aid

by Herfried K. Wagner


This edition of the column aims to analyze, on the basis of a current test, whether .NET or Java 2 is "ahead of the curve" in terms of the performance of the created solutions. For many companies, making the right choice between .NET and Java will likely matter in some time. According to the test presented, development with .NET is far superior to comparable Java systems. The article summarizes the test and is in no way intended to replace a detailed study of the test report.

At the time this article was written, the test results had only been available on the Internet for a few hours and there was still no criticism of their content. Just a few days later, as was to be expected, the first shouts were loud that the investigation had been manipulated by Microsoft. We cannot say anything about this, except that everyone should form their own picture of the matter. Two articles, which also go into more detail on the topic, have been published on the website of dot.net magazine and on heise online. The middleware company that carried out the tests were also ready to comment. The Middleware Company has already announced a second round of testing that will better address the requirements of the Java version.


Almost a year has now passed since Microsoft introduced .NET, which also brought the new programming languages ​​Visual Basic .NET and C # with it. Visual Basic .NET, called VB.NET for short, is to succeed VB6 and at the same time firmly integrate BASIC as a syntactic concept in the world of contemporary application development. In addition to the new programming language C #, which was initially supposed to be called "Cool", VB.NET is one of the most important programming languages ​​for .NET. C # was not really a new feature: It is a programming language whose style is a mixture of C ++ and Java is trying not to make the same programming language design mistakes that Sun Microsystems did with Java for about a decade. The real innovation of .NET was the extensive class library that provides functionality for .NET-based programming languages. The reason for choosing this topic was a test that compares the performance of a .NET-based solution with one developed in J2EE. The test was created by the Middleware Company.

The history 

When Microsoft released Visual Basic 6 several years ago, many users were pleased that VB6 could generate very high-performance code, but the areas of application of VB6 were limited compared to other programming languages ​​on the market. The programming language Visual C ++ from Microsoft enjoyed great popularity because of its even better performance and because of the possibilities that go far beyond the options offered by VB6.

Probably the most important opponent in the programming language sector at that time was Java, which was developed and brought onto the market by Sun Microsystems. In contrast to VB6, Java had a sophisticated and progressive class framework that contained numerous classes and methods for everyday programming. This can be compared, for example, with the MFC class library that could be used from Visual C ++. Java was a programming language that was intended as an antagonist to VB. For this reason there are numerous articles on the Sun Microsystems website in which the switch from VB6 to Java is suggested and made palatable.

Java also had other proclaimed advantages: The applications developed with it should be able to be executed independently of the hardware and operating system used. To achieve this goal, Sun had to make major compromises in terms of functionality and performance in the design. The different operating systems were too different. The result was a product that could be used to develop applications for a wide variety of operating systems; In practice, however, Java did not generally prevail over other systems; For example, the implementation of support for graphical user interfaces was too poor.

Microsoft did not try to create an alternative to Java as a platform-independent programming language, but provided a programming environment that currently only runs fully under Windows, consisting of a number of classes and development tools, which can be ported to other platforms by other companies or organizations at any time . This avoids having to make too big compromises in terms of functionality in the design.

Java was a good idea in terms of its concept, but the implementation left a lot to be desired. Several years after the introduction of Java, Sun changed the class library and created Java 2, which was almost incompatible with applications developed in Java. Companies had to spend a lot of time rewriting the code written for Java on Java 2. In addition to the instability of the system, the code created by Java, which is a bytecode, is slow to execute because it is in a platform-independent format and is only interpreted on the target computer on which it is executed. Corresponding programs that allowed Java applications to be compiled into real EXE files for Windows could not gain acceptance.

The test 

In May 2001, Sun Microsystems released an application called the Java Pet Store as an example of a J2EE-based web application. This application is to be seen as a technology example and should show what is possible with J2EE. The application should also serve as a design pattern for developing similar applications. In the following November, Microsoft published an implementation of the Pet Store with the same functionality as PetShop, which is based on the .NET Framework and was written in C #. This application should demonstrate the advantages of .NET over J2EE.

To compare the two systems, a benchmark test was carried out in which .NET PetShop performed significantly better than the corresponding implementation by Sun Microsystems. The evaluations of the Java Pet Store were created by Oracle. Soon after the results were published, Sun Microsystems, IBM and Oracle announced that the implementation of the Java Pet Store specified in the corresponding blueprint had not been optimized. This is an interesting statement as this example should serve as a model for the implementation of similar projects.

In order to be able to carry out an objective comparison, the middleware company re-implemented the Java Pet Store. Microsoft provided a revised version of the .NET PetShop. The implementation created by the Middleware Company has been optimized to the highest degree. Microsoft will probably have done something similar with its implementation. The Middleware Company monitored that both implementations met the same requirements and then created appropriate test scripts and benchmark applications, which can be found on Serverside.com.

The new version of the Java Pet Store created by the Middleware Company was approximately ten times faster than that of Sun Microsystems. The new implementation of .NET PetShop 2.0 was intended as an antagonist. During the tests it was found that the .NET version was still more than twice as fast as the corresponding implementation based on J2EE. The corresponding web service in the .NET version was even more than four times as fast as the fastest Java version. While the best Java version could only serve 2,400 users at the same time, the .NET version did around 12,000.

But not only better performance and scalability of the .NET version impressively demonstrated the superiority of .NET over J2EE. The coding effort was also much less with the .NET version - the entire source code of the .NET version consisted of around 2,100 lines of code, in contrast to this, the Java implementation had almost exactly 14,000 lines of code. The reader can figure out how much a software company can save on development and maintenance costs if the coding effort is only about a seventh. The hardware and software required for the server was only about half as expensive with the .NET system as with a system based on J2EE.


The .NET PetShop 2.0 program was written in C #, but this test result is also positive for VB.NET, as it is based on the same technology and the configuration of the server is independent of the programming language used. A major part of the implementation lies in the graphical user interface, where VB.NET would not be slower either. Of course, one must not forget in this context that Microsoft has invested a little more development work in the compiler for C # and that it offers some more optimizations than the VB.NET compiler. With a performance difference between Java and .NET of more than fifty percent, however, these small differences between the programming languages ​​VB.NET and C # will certainly not cancel out the great difference between the two systems Java and .NET.

Time will tell whether VB.NET will not also prevail over C #. Many companies are currently relying on C #, as it makes it easier for them to adopt Java and C ++ developers in new projects, but one must not forget the large number of VB developers, some of whom have been loyal to BASIC for several decades.

your opinion 

If you have any questions about this article or would like to share your experience with other users, please let us know in one of the topics below or via a new post. To do this, you can simply create a post in a forum that matches the topic, which is automatically linked to this page.

Archived user comments 

Click on this text if you have the 11 archived comments want to watch.
These originate from the time when there was no direct forum support for questions and comments on individual articles.
For the sake of completeness, you are welcome to view the hidden comments on this article.

Comment from AB on May 16, 2006 at 2:44 pm

Compare Eclipse with VS.NET, or the Javadocs with an MSDN help ... It's a difference like day and night!

With .NET it is quick and easy, no matter what language, whether VB, C # or J #.

Incidentally, have you ever integrated a web service? In .NET that is clicked in two minutes. My Java colleague spent three days with Struts until something worked.

Comment from Nik on 05/15/2006 at 9:23 pm

FYI: After a legal dispute (no details what that was exactly) between MS and Sun - after MS did not renew the Java licensing - MS was no longer allowed to release a "Java" VM. As a result, MS developed its own VM (-> .NET). MS was of course smart and IMHO stole the best ideas & concepts from Java; was able to do without any compatibilities / legacy issues / etc ... since everything was "new".

@ Java 2: Deja'vu in .NET 2.0 ?? - with Java old methods are marked as "depricated" and not simply deleted - apart from that, Java1.0 code can still be executed with JRE5.

Yes, the Java bytecode has not been interpreted for a long time (before '98 AFAIR), unless you explicitly wish it - just-in-time compilers were invented for this (incidentally, .net doesn't work much differently). - and thanks to GNU Classpath and others. Projects can also be permanently produced with native code.

In the c't there was a comparison whether C ++, C # or Java produced faster machine code - the conclusion was that Java vs. C # ran head-to-head and C ++ was a lot slower when it came to de / constructing objects. - Yes, please differentiate between code and GUI; Swing is subjectively lame, but it is neatly programmed!

My personal recommendation:
- If you have previously worked with ClassicVB, C ++ / MFC or the like. has worked: C # (the majority of MS .NET Framework is platform-dependent despite different marketing claims)
- If it should be platform-independent: Java
Ultimately it's a matter of taste - at the moment .NET is "hip"

@Dennis: "open ... - based on the language used." is also possible for the JVM, see http://www.robert-tolksdorf.de/vmlanguages.html

Comment from Johann Halmarius on December 22nd, 2005 at 10:11 am


I am of the opinion that it is better to go to Schmid than to Schmidl.


Comment from Guido on 07/29/2005 at 12:07 am

I'm interested in a programming language that can be easily ported to a wide variety of operating systems. Java is excellently suited for this, but it has been shown to suffer from performance losses. It is important to me to create GUIs in the simplest possible way and I want to do that visually because a GUI is something visual. The Grid Bag Layout Manager in Java has always been a real horror for me. At the moment I am looking for a promising alternative with which I am not wasting my already limited time in vain. So I did some research and found out as far as .NET is concerned that there is a project called "mono". With Mono, .NET can be ported to Linux, including VB.Net. Mono is open source and open source is important and good. Linux is a real achievement. Ultimately, I want to write high-performance applications flexibly and as simply as possible, and .NET seems just right for me. Did Microsoft suspect that there are people who port .NET to Linux so quickly via "mono" ??? Anyway ... ;-)))

Comment from Dennis on April 1st, 2005 at 4:23 pm

.NET programs, I can run on Linux systems.
In contrast to Java, the .NET framework is open in both directions, downwards - in relation to the platform, and upwards - in relation to the language used.

Comment from Norbert on 03/30/2005 at 10:23 am

the sentence

Visual Basic has been the fastest growing programming language since its creation in 1991. One of the main reasons for this was undoubtedly its intuitive and very easily codable syntax, the simplicity of doing things in a few lines that would have required hundreds of lines of source code in other programming languages. Even if a little more source code is required to achieve the same results with VB .NET, when making a comparison one should not forget that VB .NET is now a programming language that does not take advantage of a class framework that already contains numerous useful classes , can fall back. "

is a bit confusing at the end. Doesn't it have to be "... have to do without?"

A completely different question: There were once rumors that .NET should also be available on Linux. I don't think so, I think someone mixed up something here.

Greetings Norbert

Comment from David Mertner on 08/19/2004 at 12:20 pm

Let's be honest:
Java is just a kind of "copy" of C ++ - however
without the large dynamic structure of the latter.
Keyword: in C ++ I can choose whether I have classes
use or not. If I want, I can too
Use ancient C syntax.
With Java, I'm forced to use classes

VB, on the other hand, represents a completely new approach:
high simplicity with similar flexibility.

Comment from Herfried K. Wagner [AVB] on 08/10/2004 at 1:14 pm

As far as I know, the comparison was about the performance and scalability of the implementation, not about good / bad architecture. There are different views within the architecture community about the architecture of the pet store. The article by the Middleware Company gives the result of a comparison of two implementations that are very similar in terms of their functions at a certain point in time. The investigation found that the tested implementation by Sun did not do so well here. The fact that a change in the architecture of the Java Pet Store might lead to a better result is another topic, because that was not the point of the study.

Comment from Martin Krowald on January 16, 2004 at 5:45 pm

The article is very poorly researched:

Even before this article was published, the Middleware Company publicly admitted that the test was not fair and that Java was unfairly disadvantaged. See, for example, http://heise.de/newsticker/data/kav-13.11.02-000/ In this context, the claim of the article that it is "of course ... expanded accordingly" with new findings is a cheek.

In addition, PetShop gains performance at the expense of extremely dirty code that is very difficult to maintain. If companies were to write code like the one in PetShop on real, larger projects, they would be digging their own grave. The Java Pet Store, on the other hand, is really clean sample code, as it occurs in real projects, which should remain maintainable in the medium and long term. See, for example, http://www.ejbsig.com/docs/PetShopArchitecture.html

Comment from Michael Amplatz on December 14, 2003 at 12:46 am

It is quite possible that Java 2 has a speed disadvantage compared to .NET. Maybe even serious ones.

The advantage is still the compatibility with different operating systems! Why do you think Linux is gaining ground - because it's faster or easier?

No, but because it is open source and you save yourself the dependency on Microsoft, who never sell old products cheaper and have delivered new products with serious bugs for years.

The difficulty is the switch - and this is made easier by programs such as Java.

It should also be added that it does not matter whether programs that generate .exe files from Java programs have "prevailed" or not. What matters is that these programs exist and that any programmer can use them. If it is not used, it will probably be because it works well in other ways.

Comment from Konrad Rudolph on 08/20/2003 at 1:33 pm

Yes - from my point of view, no questions remain unanswered. Good, objective article. There is nothing more to add.
However, the link to .NET PetShop 2 does not work.