Author: China Forum Network collection Source: http: //www.51one.net Joined: 2004-7-23
Guide: Facing Microsoft's launched .NET Framework, you may have the following questions: What is the .NET platform? How to compare the .NET architecture and J2EE? A set of architecture we can learn from .NET's architecture? In this article, the author will unlike these questions. Liao Yongkang Original Source: http://java.sun.com/features/2000/11/dotNetvsms.html Even if you don't specifically describe the Microsoft platform, you may also hear Microsoft .NET. This is Microsoft's answer to the most recent series and non-video events. If you have read the news, from Microsoft's writings, or through incomplete technical information you get in the MSDN side, or you noticed the Microsoft Expert Developer Meeting (I have already demonstrated the .NET platform), you There may be at least two questions: * What is it accurately? Net platform? * How to compare .NET architecture and J2EE? If you go deep into step, you may have the third question active in your mind: * From the .NET architecture Dictionary of the entire set of business we can learn this in the enterprise software development plan? The .NET framework is a very early stage of its life cycle. Microsoft .NET sector will also develop it more deeply and carefully, but in any case, we have been able to make just right to justify these issues from existing information. Reply. what is it? (.NET What?) Now in many forums reflection to .NET, can't help but remember three fables; according to your insight, it may be very different: someone thinks .NET is Microsoft's next-generation Visual Studio's development environment; some people think it is just a new programming language (C #); some people are based on XML and SOAP's new data exchange and packet working framework. In fact, .NET contains these parts, and more. First, let us see some specific details, browse a series of technical components that make up the .NET platform: l C #: is a language of a new description (book) component, which integrates C, C and Java elements And add some features such as metadata tags, development of related elements. l "Working at the public language": It is in the intermediate language (IL) format, running byte code, using a language written code and object as long as the compiler is developed for this language, obviously capable of compiling into IL runtime. l A group of components (components) accessed from "public language", which provide various functions (such as connecting network functions, package container functions, etc.). l asp.net: It is a new ASP version that supports the ASP to compile as a public language runtime function (so use the ASP scripts written in any language). l Window format and Web format: a new UI component frame that can be accessed from Visual Studio. (User Interface = UI). l ADO: The new generation ADO data access component (component) for data exchange uses to use XML and SLAP. How is .NET and J2EE? As we can see .NET platform, there is a technical matrix (Baota) under its umbrella structure. Obviously Microsoft is to grasp the developers of the window platform, which is incorporated into existing platforms such as J2EE and CORBA substitutes. But how do you make top-by-item? One way is to make .NET and J2EE as the following comparison list: .NET J2EE key difference C # programming language Java programming language C # and Java all from C and C , most significant features (such as the namespace of the garbage collection hierarchy) in two Aspect.
C # borrows some of JavaBeans (feature properties, events, etc.) and adds some of their own concepts (such as metadata signs), but combines these features into different syntax. Java runs on any platform in a Java virtual machine, while C # is in the foreseeable future, running in the window ring. C # implicitly binds to the IL public language running, (see), then run in a reasonable order (JIT). Compiled byte coding or the entire compiled natural coding. The Java code is run by the Java virtual machine byte code, which is compiled by VM or JIT, or the entire compiles into natural code. .NET public components (Fills ".NET Frame Structure SDK") Java core API high-level .NET components, including distributed access to XML and SOAP (see ADO.NET). ASP.NET page (ASP.NET) Java Server Page (JSP) ASP.NET uses Visual Basic, and C # may have another language as a code segment. It is compiled into natural code when running through the public language (the corresponding correspondence "is like an APS, each time you parsing it). JSP uses Java code (segment or javabeans reference), or compiles to Java byte code (to be determined according to the JSP implementation system on-demand or batch). The .NET public language is run to use a group of shared components in a variety of languages when running in a variety of languages. Get precedence over all components of the .NET frame (common components, ASP.NET, etc.). IL Public Language Runtime Java Virtual Machine and CORBA IDL and ORB Java Virtual Machine Procedures Allow Java byte Codes, running on the JVM on any platform. CORBA allows code for multiple languages to use a set of shared objects, running on any platform with ORB, is not tightly integrated into the J2EE framework. The same web components (such as JSP-based files) are not available on standard Java platforms, and some proprietary components can only be obtained by Java IDE. Window format and Web Format Java Frame Transfer via the MS Visual Studio IDE instead of this article, supporting the Window format and WEB format RAD development, "Swing" (Swing) is supported in many Java IDEs and tools. ADO.NET and SOAP-based Web Services JDBC, EJB, JMS, and Java XML libraries (XML4J, JA-XP) ADO.NET are built on the XML data exchange located at the top of the HTTP protocol (referring to remote data objects and multiple Data exchange between application bundles). Generally speaking, .NET's Web service assumes the SOAP signaling model. EJB, JDBC, etc. to separate data exchange protocols and developers, do not work in HTTP, KMI / JRMP, or IIOP top. The comparison of the table only grabs the surface phenomenon, summarizes the comparison of .NET and J2EE: l Features: .NET and J2EE provide equally excellent features, although the ways provided are different. l Portability: The core of Net works only in the Windows environment, but in theory can support multilingual development (as long as these languages / supercharies have been defined, IL has established IL translater). That is to say: SOAP's ability allows data packets to be performed on other platforms (components) and .NET components. And some elements in .NET: like SOAP, its recovery and lookup protocol, as a core component of the public part (IL runtime environment, the window format of ASP.NET and the web format "contract", etc.) still Microsoft masters, Microsoft only plays the role of the entire .NET development environment and runtime environment providers. In fact, I have long since I have requested Microsoft to disclose these procedures, but this is contrary to Microsoft's standard experience. On the other hand, J2EE can work on any platform as long as it follows Java VM (rules) and a set of platforms required for a set of platforms (EJB Package containers, JMS services, etc.).
All of these define the procedures for J2EE platforms have been published, and public reading is available. Therefore, many suppliers also offer compatible products and development environments. But J2EE is a single language platform. If you call or access objects in other languages, it may be necessary to pass CORBA, but CORBA support is not partially existed. Huge prospects: The last few points have sketch the difference between .NET and J2EE, and the role played by Microsoft in these respects. Microsoft is now doing two things for .NET: Integrating XML and SOAP into their information transfer scenarios, to open the path to .NET to other programming language developers and non-.NET components. By interacting the language components, .NET is released Perl, Eiffel, Cobol, and other programmers, allowing them to play a Microsoft's "sand table" role. These language enthusiasts should especially abide by rules because most people in them feel constraints and delimited in Microsoft / Sun / OpenSource competition. Therefore, as long as XML and SOAP is used in his component to use XML and SOAP, Microsoft will support them to add open parts to their platform, and get rid of dedication. What is the correct response? For Microsoft's developers, .NET is a good architecture that you can hand over many things to Microsoft's architecture. ASP.NET is better than ASP, ADO.NET is excellent than ADO and DCOM, but there is a difference, C # is better than C and C . .NET initial version will be available at some time in 2001, so you have enough time to prepare. But it can be sure that it will become the default (agreed) development environment of the Microsoft platform. If you are working in Microsoft's development architecture, you will definitely get benefits in your architecture in Microsoft's development architecture. However, several expectations of the .NET platform are extremely high, but it cannot be guaranteed to start, at least in the short term. For example, IL public language is running to make developers to benefit from some obvious obstacles to overcome. Want to integrate each language and component, you must define subset / supercharges in this language, and clearly spread to IL run, and must define structures to provide metadata required by IL, then And must be developed for two compilers (objects, components, etc.), from XML to IL and from IL to XML, integrated into the IL component byte code, but also generates existing IL components. Language-specific interface. There are still some historical factors, and many bridges that must be developed from Java language to JavaVM, such as: JPython, Percobol, The Tcl / Java Project. At the same time, if there is enough interest, BERTRAND Meyes should be placed in the Eiffel-To-Java VM system a few years ago (several years later), only JPython exceptions. These tools have been widely adopted, even in their own related committees, even if they seem to provide a way, use the language you prefer (although not the entire J2EE architecture). However, why is this lack of enthusiasm? Because people hesitate, they don't want to withstand from their development language, add additional translation work to the target architecture. If the Java environment is a goal, people usually choose to learn Java. I expect that it is also the same for .NET. People will choose to learn C # and write .NET in this language. On the other hand: SOAP based on .NET will be used for distributed communications, beware of performance loss. SOAP basically means XML on HTTP.
HTTP is not a high-performance data protocol, so XML implies an XML syntax parsing layer, which is to require more computing overhead. The opposite part of the two greatly reduces the transaction rate of relative to another message / communication channel. XML is a very rich, very powerful letter of communication. HTTP is very flexible, so that many firewalls can be prevented, but if the transaction rate is priority to you, keep your option open. For Java and Open Resources, please don't use .NET as a means of Microsoft market competition, continue to understand .NET may be easier to accept. But .NET is not a signs, but a major transfer of Microsoft strategy will bring gospel for its platform. They are doing better and struggle for other architectures and platforms. Provide a query-free statistical information on its own cost and seamless integration. Now they are working hard to gradually open the Java and open resources themselves, and then try to directly meet the needs of developers. In the past period, because they did not do well, two things failed. If you think you are the acoustic communicator of Java and non-resource platform, then the nature of competition will change. In addition, Microsoft's IL runs, at least there is at least a payable target: it is to clear the obstacle of the programming language into the structural frame. Java clears the platform's obstacles (of course within a limited range, for example, you can't do so you don't have the software). But in order to use J2EE to make development work, you must work in the Java environment. And .NET is to make you use the language you choose to build .NET application, this is very wonderful. Although there are still some big problems that have not been resolved. For example: IL mode in .NET does not actually become a widely used (tool) (as described above). Anyway, this shows that there is a weakness in the J2EE mode of a single language. The importance of this weakness can be doubts, but it still exists, so it is worth considering the Java Committee. If the developer really thinks so, you can put the power in the Java byte code generator, to accommodate non-Java languages, of course, this requires organization and concentration (summary). A further study of J2EE and immediately get some conclusions. In order to support this platform and .NET comparative advantage. First XML supports seamlessly integration into the structural frame, we do not say to use the XML SAX / DOM syntax parser as a set of standard services or to extend the use of XML in the configuration component. The sending and operation of XML is required here is at any time available. The recognized approach is to send a letter at the top of the JMS, but not all platforms have this facility. XML space is a pile of messy standards, non-key factor standards, API and DTD are expected when you handle metals. of. But Microsoft has placed SOAP on the base layer, which is difficult to put some understandable and useful things in the developer hand. J2EE's initiator needs to do the same thing in their platform. Remember a possibility that the XML sender is placed at the top of the JMS. The java naming and directory interface are followed by JAVA naming and directory interface or JNDI, NIS, and COS names with LDAP. This combination of this and standard SOAP / BizTalk vendor, EBXML supplier, etc. will be an impressive statement (description). Clarification and correction: Due to this article published in August 2000, 40 readers returned to us with their concern .NET and J2EE comparison (see readers reply), this author Jim Farley filtering these content, while email Reply to them, thus adding the following clarifications and corrections. Clarification: Compilation characteristics of C # and comparison of Java seem to make readers to confuse, in order to be clearer, we compare them to another method: C # code is always run in nature. The Java code is typically running in parsing byte code; C # can compile into natural codes, or compile into the public language runtime byte code, and then compile natural codes by sequence during execution.