J2EE .NET Poke Shop (2002.04.26) from: Java Weekly
I believe that you will often see a lot of statistics, from all manufacturers, various communication media, and various political groups, but the numbers will speak, but often speak. A report that compares Microsoft .NET and Java J2EE architecture execution efficiency, often used by Microsoft camps as evidence of combating J2EE. For example, this paragraph:
According to Microsoft claims that Visual Studio.net can support 25 languages, compared to Java with a 2/3 program code, 5 times effective, carry six times the user's functions - April, Taiwan CNET 2002 Second day news zone
What is the ability to report this superior ?NET performance? Is it true? This week I came to tell the beginning and end of this brilliant story.
J2EE (Java 2 Enterprise Edition) is an application of Java technology in business operations. It contains multiple operational standards, EJB component architecture, JDBC database operation, JMS message delivery, Java Servlets / JSP and other Web component programs, etc. But content is profound, in order to make users have a template for design J2EE architecture applications, Sun makes a system name "Java Pet Store". This online pet store is an example of a person who is familiar with Java programming and J2EE concept, providing a system designed in a formal way, making a reference for people to use J2EE architecture.
This example comes out, soon it is used as a basis for compatible with J2EE compatible products. First, at the Javaone meeting last year, the Oracle Big Board, which was invited to participate in the theme, bombarded the BEA, who had just finished the next step, publicly claimed that Oracle's J2EE Application Server (Oracle9ias) was performed as the three of Bea WebLogic. Double, and it is also twice that of IBM WebSphere. The next IBM and BEA stand out to counterattack, such as BEA publishing a performance data in July last year, data showing WebLogic Server 6.1 is four times that of IBM WebSphere, and 54% faster than Oracle products, etc. . This situation is actually normal. The spirit of the Java standard is originally the cultural standards of various manufacturers to develop technical standards, and then they will have good products based on this standard. However, when the J2EE manufacturer is more lively, but halfway killed a bite gold. Microsoft has a website called GotdotNet to announce a report, claiming that they use the same architecture to use .NET technology to make the same system, result It is the paragraph at the beginning of this article: "Compared with Java with 2/3 program code, the function is 28 times faster, the functions of the use of six times the user." This number is announced, often used by Microsoft and Microsoft's dealers as .NET far beyond J2EE evidence.
This amazing data certainly causing the J2EE camp to question, so everyone can see how these numbers are generated, and they are quickly found in them. This .NET version of the pet store system has been modified from the beginning to the tail, and the entire architecture is different from the original Java Pet Store. According to the finishing of the parties on the network, the main differences have the following:
1. The architecture design for Java PET Store is called MVC Design Pattern. MVC is a short written by Model-View-Controller, a kind of Design Pattern, from SmallTalk. Incidentally developed such large applications often mix together different parts of different purposes, resulting in unclear project members, and system is difficult to maintain. MVC Design Pattern is divided into three classes into three classes. The Model object is specifically used to package the status of the application, and the view is used to demonstrate on the screen, and Controller is responsible for defining the various action and reactions of the application. The Java Poke Store system uses the MVC Pattern to design the entire system architecture, clearly separated the objects of each layer. The .NET's pet store is completely the architecture of its definition, so it is completely different from the original example at the beginning. 2. In terms of data access, .NET Pets use the Store Procedure in the database. But in the original Java pet store, these business logic work is placed in the intermediate layer assembly. Putting these efforts in Store Procedure may add some execution efficiency, but sacrifice the elasticity of the program and put all kinds of work in Store Procedure, the disadvantage is not easy. And for some Yangchun type database systems (such as MySQL), it does not have the function of Store Procedure at all.
3. In the database, .NET Pet Store uses ADO.NET's SQL DataReaders to access Microsoft SQL Server's information. But if the database is replaced with other label products, such as Oracle, Sybase or DB / 2, although it can still be accessed by ADO.NET through OLE DB and ODBC, it is impossible to follow Microsoft SQL Server is the same. So Java Pet Shop is a show that the .NET pet store uses its own product / technology in all aspects.
4. In addition. Net pet stores have a way to improve the efficiency figures, that is to change the Query Statement of SQL, let the number of information written in the biographic number. This trick really has an immediate effect :)
Simply put, this .NET version of the pet store and the Java pet store's biggest difference in architecture design. The purpose of the Java pet store is to show an expandable corporate computing architecture, which is the three-layer (3-tiers) design, the data display layer is in the outermost, the middle is the intermediate layer component of the execution of the business operation logic, and the rear end is simple It is a relational database that stores information. In this way, it is very clear and clean, and the various divisions. And Microsoft's .NET pet stores are actually similar to traditional two-layer (2-tiers).
In addition, Java Pet Store applies only to a J2EE architecture design template and is not particularly designed for accelerated performance efficiency. However, the .NET pet store is completely based on the performance efficiency, and re-tested, although the system runs like the appearance and function, but it is not so much. If you use it to show .Net can also make a set of the same pet store system, but if you use the execution efficiency, it is a bit unfair.
Recently, the latest developments were Sun's Java / XML department president, Rich Green announced at the Javaone Conference, Oracle and IBM also achieved performance improvement in the Java pet shop, with the result than .NET pet stores, 18 to 22 Multiplier. For example, in the EJB component of the intermediate layer, they use the ismodified () method to avoid unwanted database update actions, which greatly enhances the overall performance efficiency. And for the system's architectural elasticity and program portability, Store Procedure is still used in this new version of the system. Oracle's latest report and original code can be downloaded in the following website:
http://otn.oracle.com/tech/java/oc4j/content.html In addition, there is also a gesture on the THESERVERSIDE website to start without sacrificing the original architecture and flexibility. Optimized invincible ultimate version Java pet store. There are also people simulating the way .NET pet store, simply get a two-layer (2-tiers) Java version of the pet store, and use Microsoft's example system "North Wind Database" to put on the website to make a line Comparison. Their URLs are:
http://www.javelinsoft.com/petstorehttp://www.javelinsoft.com/northwind
I believe this pet shop is not finished, J2EE manufacturers, supporters of Java camp on the Internet, plus .NET camp, will continue to improve their own systems, and publish more dreamy data. General users should pay attention to not being checked by simple numbers, don't follow it. It is necessary to see which modifications do it do to do this, and the effect is not everything, the system's stability, the structure of the architecture and procedures of the structure, the procedure maintenance is difficult, it is a considerable amount. factor. And since it is necessary to play, it will be fair than the Olympics. You have taken the rules in the water to take your hand in the water, but there is a person for speed, put a propeller in your ass, then claim it. Breaking the world record, there is another group of people who have an applause next to it, so it is not right.
Here are the article usage mentioned in this article, friends who are interested in further research can be referred to:
The original URL of the Java pet store (including all files and sample program code): http://java.sun.com/blueprints/code/index.html#java_pet_store_demo
Sun is about this Java pet store system of FAQ.HTTP: //java.sun.com/blueprints/qanda/faq.html
Interpretation of MVC Pattern files: http: //java.sun.com/blueprints/patterns/j2ee_patterns/model_view_controller/index.html
.NET version of the pet store website: http://www.gotdotNet.com/team/compare/petshop.aspx
Oracle version Java pet store Website: http://otn.oracle.com/tech/java/oc4j/content.html
BEA version Java pet store Website: http://www.bea.com/press/releases/2001/0709_benchmark_bea-ibm-oracle.shtml
IBM's response to .NET proposed: http://www-3.ibm.com/software/webservers/studio/msnetReview.html