Comparison of Microsoft. NET and J2EE components

Source: Internet
Author: User
Tags new set
Comparison of composition technologies of Microsoft. NET and J2EE
Even if you do not write on Microsoft's Platform Program You may have heard of Microsoft's ". Net" platform, which is used to deal with non-Microsoft weapons. If you have read Microsoft press releases, or you have browsed msdn content, you have attended Microsoft's professional programmer Conference (that is 「. net), you may still have two questions:

What is the ". Net" platform?
What are the differences between the ". Net" architecture and J2EE?

If you want to go further, you will have the third question:

What can we learn from the ". Net" architecture that helps to promote the thinking of enterprise software development?

At present, the ". Net" architecture is still tender, and many details need to be clarified by Microsoft's ". Net" team. Even so, we can still get answers to the above questions from the existing information.

What is the ". Net" platform?
Today, people think about the ". Net" platform in a similar way. They have different ideas. Some people say 「. net "is Microsoft's next-generation Visual Studio development environment; some people say it is a new programming language (C #); some people also say that it is based on XML and soap to exchange and transmit information. In fact, the above three roles are all ". Net" roles.

Let's get some more specific ideas first. The composition of the ". Net" platform is listed below:

C # Is a new programming language used to write categories and components. C # integrates the features of C/C ++ and Java, and adds some other features, such as metadata tag.
A common language runtime system is used to execute programs in the Il format Code . The original program of any language can be executed on the ". Net" platform after being compiled into the Il format.
A group of basic components that provide diverse functions (such as networks) for the system during execution.
"ASP +" is a new version of ASP that allows ASP to be compiled into the Il format.
"Win form" and "Web form" are a new set of UI component skeleton for Visual Studio.
"ADO +" is the new version of ADO. It uses XML and soap for data access and data exchange.
what are the differences between ". Net" and J2EE?
as you can see, the ". Net" platform is a combination of technologies. Microsoft regards these technologies as another option of existing technologies (such as J2EE and CORBA), but what is the comparison? Below are some of our analysis and comparison:

Microsoft. NET
Main differences
C # Programming Language
Java programming language
Both C # and Java are from C/C ++. The two have many common features (including automatic memory management and hierarchical namespace ). C # I learned some component concepts (propertie/attribute and event) from J avabeans, and added some features (such as metadata tag), but used different syntaxes.

Java can be executed on any platform with a Java virtual machine. C # currently, it can only be executed on Windows.

C # Use the execution period system of Il. Just-in-time (JIT) compilation method or native code compilation method is used for execution. Java programs are executed through Java virtual machines, but can also be compiled into native code.
General components of ". Net"
Java core API
The higher-order ". Net" component supports access through XML and soap. (See the Introduction of ADO + below)
Active Server Pages + (ASP +)
Java serverpages (JSP)
ASP + will be able to use Visual Basic, C #, and other languages to Write Program fragments, and then compiled into the Il format (unlike the previous ASP each time it needs to be translated ). JSP uses Java program code to compile it into Java bytecode (it can be compiled only when necessary, or it can be compiled in advance ).
Il execution period system
Java virtual machine, corba idl, and CORBA ORB
". Net" allows different programming languages to use the same set of components on Windows.

Java allows Java bytecode to be executed on compatible virtual machines.

CORBA allows objects in different languages and platforms to communicate with each other (ORB must be available ). You can use CORBA in J2EE, but the degree of integration between the two is not very close.
Win form and web form
Java swing
Similar web components are missing in the standard Java platform. Some other vendors provide some components in Java IDE.

MS Visual Studio ide provides win form and web form RAD tools, there are no other vendors claim to support win form and web form. Many Java ide tools support swing.
Web Services of ADO + and soap
JDBC, EJB, JMS, and Java XML link library (xml4j, JAXP)
Ado + allows XML data exchange over HTTP (between remote data objects and multi-layer programs), that is, soap. The ". Net" Web Service uses the SOAP message model. EJB, JDBC, and so on are the communication protocols for data exchange to be decided by the programmer. Both HTTP, RMI, jrmp, and IIOP can be used.

The comparison between the two technologies is as follows:

Features: Both. NET and J2EE provide many similar features, although the methods are not necessarily the same.

Portability: ". Net" only works on windows, but theoretically supports many languages. In addition, ". Net" supports soap, allowing components on different platforms to exchange messages with ". Net" components. Although 「. net (for example, soap and its discovery and lookup mechanisms) are open specifications and core technologies (for example, il execution system, ASP +, win form and web form) they are still controlled by Microsoft, and Microsoft will be 「. net.

J2EE can be executed on any platform with JVM, as long as it has compatible services (such as EJB containers and JMS. All J2EE standards are open, and many vendors provide compatible products and development tools. However, J2EE is a single-language platform. to communicate with other language platforms, you must use CORBA (currently, it is not necessarily supported on the J2EE platform ).

The above analysis shows the main differences between ". Net" and J2EE. Microsoft is 「. net 「.. net 「. net to non 「. NET Component (via XML and SOAP ).

Because ". Net" allows integration of components in other languages, ". Net" gives programmers in Perl, Eiffel, COBOL and other languages to work on Microsoft's platform. Language lovers especially like this because most of them do not care about the war between Microsoft and Sun and the open camp.

How did you respond?
For Microsoft programmers:
If you keep keeping track of Microsoft's architecture, the emergence of ". Net" is a good thing. ASP + is better than ASP; ADO + is better than ADO; C # is better than C/C ++. The ". Net" platform will not appear until 2001, so you still have time to prepare. Undoubtedly, it will become a development environment preset by Microsoft. If you are using Microsoft's development tools now, you will also enjoy these benefits after you move to ". Net" in the future.

However, some of the goals of the ". Net" platform are too lofty and cannot be achieved (at least in the short term ). For example, the Il execution system has some obvious difficulties to overcome. To integrate into this system, each language must clearly define how to correspond to Il and the metadata required by IL. A language must be compatible with IL and must provide a compiler (x language to Il, and IL to X language ).

This is available for searching. Many compilers can convert non-Java languages into JVM executable programs. These languages include jpython, percobol, And the Tcl/Java project. Interestingly, even Bertrand Meyer and some Eifel-to-JavaVM tools were made a few years ago. Among them, only jpython is successful, and other tools seem to be useless, even the communities of these languages are not used, although these tools enable them to write Java programs in their favorite language. Why can't we get enthusiastic? I believe this is because people suspect that the mixed two heterogeneous Language Environments will not be satisfied. If they want to write programs executed on the JVM, they would rather spend time learning the Java language. I think the same situation will happen on the ". Net" platform. People would rather spend time learning C # To write ". Net" programs than using other languages.

Note that the performance of the soap architecture used by ". Net" is worth noting. Soap uses http to transmit XML. HTTP is not an efficient communication protocol, and XML also requires additional file profiling (PARSE), which is a computing burden. The combination of the two will make the transaction speed much lower than other solutions. XML is a widely used, sound, and meaningful message mechanism. HTTP is a widely used and can avoid many firewall problems. However, if efficiency is very important to you, so you should look at other methods instead of using soap.

For Java and Open Source:
". Net" is easily regarded as a solution launched by Microsoft based on market demands. In fact, ". Net" is a sign of Microsoft's policy changes. In the past, Microsoft had a good result in the face of other architectures and platforms. Now they are facing pressure from Java and open source and are beginning to show signs of "Openness, I also tried to directly meet the needs of programmers, which is very different from the old boss's style. If you are a Java or open source enthusiast, note that the nature of this war has changed.

Moreover, Microsoft's il execution system has a noteworthy goal: to eliminate barriers between programming languages and APIs. Java eliminates the barriers between platforms, but if you want to use J2EE, you must use the Java language. ". Net" is amazing if you want to use your favorite language to develop the ". Net" Program (but whether the result will come true is still a big question mark ). From this point of view, J2EE is not as important as ". Net.

If J2EE wants to face ". Net", several issues should be noticed immediately. First, J2EE should integrate XML well. I am not referring to the API for developing XML sax/DOM, nor using XML as the profile format. I am talking about how XML message exchange and processing should be added to J2EE. Of course, currently you can use XML format as the content of JMS messages, but the entire J2EE will not benefit from this. XML is a collection of standards, including industry-standard APIs and DTD, which should be the benefit of data exchange.

however, Microsoft has placed a bet on soap and is actively sending soap-related information to programmers. So should J2EE. One of the methods I think of is to add an XML messaging provider to JMS and integrate it into Java Naming and Directory Interface (JNDI) and LDAP, NIS, cos naming and other technologies. In this way, we combine technologies such as soap/BizTalk provider and ebXML provider.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.