J2EE VS .NET (below)

xiaoxiao2021-03-06  46

There is a different in the same way

- Similarities and differences between J2EE and .NET platform architecture

Nanjing University of Posts and Telecommunications Li Jianzhong

Central South University Bishijie

As an application platform, J2EE and .NET development platforms are extremely similar to the target and architecture, it is completely different in achieving. The platform system architecture is the basis of the support platform, and the performance of the platform will also be different due to the difference between the platform architecture. Three aspects that have a vital impact on two platforms are: system platform basic construction, three-layer / multilayer architecture and transplant / performance / extension. J2EE is a platform specification rather than products, peers, and .NET also focused on the architecture specifications of the platform, and less related to specific products, although it is said to .NET. Can't be distinguished.

Similar platform foundation structure

A platform often produces an important effect on the availability, productivity, transplantability of the platform in language compilation, code execution, and programming support. It is also an important basis for the judgment of a platform for specific applications. J2EE and .NET two platforms are derived from the managed virtual machine concept, but .NET's CLR is far more far along the Java Virtual Machine (JVM). The CLR has added a multilingual support to the .NET platform while using the mechanism of JVM automatic garbage collection and abnormal processing, and the components such as multilingual support, component self-description.

On the .NET and J2EE platforms, the compilation of the program has passed two similar processes. First, specific advanced language compilers translate C # (and other .NET languages) and Java source code into intermediate languages ​​(IL) and byte code, respectively. .NET is designed in the intermediate language, considering the multi-mainstream advanced language, implemented the cross-language commitment of the .NET platform at this level. J2EE's cornerstone is a Java language, and its most typical features are: written and run multiple times. Cross-platform is a key to J2EE, which is achieved by JVM.

Second, in execution, the intermediate language is compiled into a binary code of a specific platform, and the byte code is performed by JVM, and the instruction function of the respective language is performed. Given that Microsoft's code optimized in the "Wintel platform", the execution speed of .NET code has an obvious advantage in Java. But on the UNIX / Linux platform, J2EE has almost become the only choice, and it doesn't matter if the J2EE has become the only choice. At the same time as the code is executed, the general language running and Java virtual machines have also proposed an automated memory management of abnormal capture, type security, memory allocation, garbage collection, which greatly reduces the memory leakage problem of modern software and the heavy burden of programmers. .

Object-oriented programming has received direct support in J2EE and .NET platforms, single inheritance plus multi-interface implementation is the features thereof. But in other objects, .NET provides direct support to modern component programming. Of course, many business middleware of the present is based on the J2EE platform, just .NET from design, encoding, configured to run more, more direct support.

A wide service can be provided for programming, which is very important to modern software platforms from the Raise PI class library. From the base collection, strings operate to enterprise-level API interfaces, such as JMS, JDBC, JAX, JNDI, etc., you can see J2EE has a very solid structure in this regard. Microsoft .NET framework class library is not weak, providing a series of APIs such as drawings, networks, threads to ADO.NET, ADSI, Windows form, ASP.NET. It is difficult for these basic and enterprise-class services to be high, and the support of the function collection is a time problem. It is often a platform to launch a single function set, and another platform is immediately launched. Similar features set.

In addition to the seamless functional multiplexing of the API class library, the calling operation of the local platform is also worthy of attention. Both CLR and Java virtual machines support calls for local methods. In terms of heterogeneous platforms, J2EE is more than IIOP (Internet Interorb Protocol), while .NET uses SOAP. The same three-layer / multi-layer system

Based on the three-layer / multi-layer distributed computing structure has become a mainstream mode of today's enterprise applications, and it is also a powerful point of the two platforms.

At the client, the representation is responsible for the interaction of the user and the system. For different processing requirements, .NET and J2EE provide a desktop-based application and a browser-based web application development component: Java Application and Windows form, Java servlet / JSP and ASP.NET double-double forming angle. However, the Windows form relies on the natural advantage of the Microsoft desktop system, regardless of the interaction speed or the performance performance of the interface is slightly better than Java Application. Servlet / JSP and ASP.NET are currently the focus of the company's "thin client" application, both based on the HTTP request / response model, complete the user interaction with the HTML browser page. Although the ASP.NET claims that it has obtained a considerable processing speed by compilation, as well as the browser adaptive ability of the server controller, it is difficult to currently do not, it is difficult for this. In terms of caching, state optimization, both are quite ahead. Another technology related to client applications is ActiveX and Applet, but from the current trend, they gradually margin on both platforms, nor are they accepted by most companies.

In the middle layer, distributed business components are responsible for the business logic deployment of enterprise applications. Since these business components are often responsible for processing high resources such as database connection, network resources, threads, so they have always been the key and corporate applications of the three-layer / multi-layer architecture. J2EE's EJB is a mature, a large-scale enterprise component framework that is widely supported by the industry, and the .NET component is built on the new COM service, both in the interaction between components and operating systems, client resource sharing, etc. Have a good support. The core of the EJB is a container. The container is a runtime environment that provides services for components. It is responsible for providing services such as transaction, persistence, security, and forming state automation management. It separates business logic and system underlayer logic. Developers' work is greatly simplified. .NETs support self-descriptive component development, XCOPY deployment, and multi-edition coexistence, without registry and description files, have a certain attraction of business customers without registry and description files.

At the backend data layer, both platforms have done a set of data access models: J2EE's JDBC and .NET ADO.NET. They also support new XML data sources while supporting traditional SQL data sources. This is difficult to say that the data model is more advantageous due to more about specific database products.

It is worth noting that while the three-layer / multi-layer architecture is created, the web service is also considerable attention to the J2EE and .NET platforms as a new generation of enterprise computing models, and the article will have a detailed review in this regard.

Different portions, performance and expansion

In portability, Microsoft will eliminate the difference in programming languages ​​through .NET universal language, J2EE is eliminated by Java virtual machines. "Select .Net platform means choosing Windows", this sentence is still a basic fact in at least a foreseeable period. Cross-platform is a big selling point for J2EE, but also an important reference factor when choosing an enterprise application development platform, and almost all mainstream operating systems provide support for J2EE. In fact, if you want to build multiple operating system platforms across Unix, Windows, the J2EE platform is almost the only choice. J2EE is more concerned about cross-platform instead of crosswords. But Microsoft believes that if the company's applications can be released by the standard protocol, the platform is neutral. Cross-platform is even Microsoft. In order to attract more developers and encourage the majority of enterprise vendors to transfer to the .NET platform, Microsoft propose multi-language support, hoping to balance cross-platform interoperability with cross-language interactivity. Performance is J2EE and .NET chattering topics. The famous argument between the two is an example application on pet stores. Pet Shop is an exhibition for the SUN once as a J2EE typical application, but .NET "self-discussed" achieved the pet store application on his own platform, and claiming the code line is 1/3 of J2EE, the efficiency is J2EE 30 Multiplier. But the reason for Sun is that this example is not suitable for performance comparison, which does not do the optimization of performance, and accuses Microsoft's efficiency of the .NET platform optimization and cache. Such a quarrel certainly cannot be a basis for our judgment, and there is no more objective third-party evaluation report. On the "Wintel Platform" we might have no reason to suspect .NET performance, as for non-Windows platforms, .NET and J2EE no longer have comparable.

In terms of maturity of the platform, both have a fight. J2EE formed its mature architecture in 1999, and today there is a quite mature inspected enterprise application system. And .NET is sourced from Microsoft's previous platform DNA (Distributed Network Architecture), including many technologies that have been proven, and these technologies have been implemented in the product, including Microsoft transaction servers, COM , message queue, SQL Server database, etc. For extensibility, the fact that is widely accepted by the .NET platform is based on software transverse extensions, while the J2EE platform extension is based on hardware longitudinal expansion. This is also in line with Microsoft and Sun's product interests.

Another important feature of J2EE is its architecture openness, it itself is a series of specifications, not products, any products that meet this norm are J2EE compatible. This makes J2EE have been widely supported from the beginning of the development. BEA, IBM, Oracle, etc. have developed application servers in accordance with J2EE, and their products are even compatible with each other. And .NET tightly tightly glues the platform specification with the product at the beginning of design, although a small portion of the .NET architecture has an openness (such as C # language, general language basic construction CLI and Web service standard), but at least It's hard to imagine there will be a non-soft .NET implementation.

Who is the WEB service?

■ Chai Xi Road

It is already the second quarter of 2002. Gartner Group's forecast for Web service seems to be slightly delayed by the product provider. Recently, Microsoft's .NET Framework and its development tools have just officially released. As a Web Services World, another heavyweight role Sun, also adds a powerful toolkit Pack (WSDP) for its J2EE Framework to develop Web services. From 2002 to 2005, the development and deployment of the B2C, B2B, and E-Government fields predicted by Gartner Group will reluel for the two platforms of J2EE and .NET and their development tools.

.NET and J2EE support the support of Web services from .NET and J2EE's development history, .NET has been deeply impressed by Web service technology from the beginning. In its marketing activities, it is not true. Highlights the characteristics of its development and deployment platforms as a web service. It can be said that .Net is born to develop and deploy a platform for web services. Relative to .NET, J2EE is a comparison "old" thing, initially, in order to expand a Java platform to a platform framework specification that is developed by the enterprise application field. With the rise and development of web services, J2EE platforms are unable to avoid the industry's major technical revolution --Web services. With the development of Web service technology, J2EE continues to introduce support for web services.

From service description, service implementation, and service, discovery and binding, and service calls, and implementation of these different perspectives, J2EE and .NET support basic incomprehensible, the only difference may be .NET development tools For convenience, the integration is higher. .NET is a platform that appears after J2EE, all of the heavyweight technology products absorb the advantages of previous success, .NET absorbed the advantages of the J2EE platform. Among them, the most important point is that .NET no longer completely follows Microsoft's previous technology, starting from .NET, its application is no longer running with local machine code, but compiling into an intermediate code, by virtual machine called CLR, running, In this way, .NET also has a cross-platform possible. However, the cross-platform characteristics of .NET are mainly reflected in supporting a variety of development languages, VB.NET, C #, C , JScript, etc. can be compiled into the same intermediate code, using the same runtime execution.

Third-party manufacturer's support

As an open specification, J2EE has been supported by many vendors from the beginning, IBM, BEA, HP, Oracle, etc. have a large investment in J2EE implementation. The best J2EE application server on the market is not an iplanet with Netscape joint ventures, but the WebShpere of the BEA WebLogic and IBM. The annual Javaone participated in thousands of developers. Since J2EE is an open specification framework, any manufacturer can develop realization according to the specifications, and different manufacturers can cooperate together, of course, the most critical is that these participating J2EE manufacturers have strong strength. In addition to Microsoft, basic all software industry will be close to J2EE.

However, although J2EE is an open specification, its use is not so open, and each company who uses J2EE technology has to pay a small fee to Sun to SUN. At the same time, it is also because Sun's exclusive control of J2EE specification, so that the development of J2EE specification is slow, so so far, the J2EE specification does not include support for web services. The WSDP launched by Sun is just a plurality of plug-in forms. There is a message indicating that other supporters in Sun and Java are, including IBM, BEA, Silverstream, etc., including IBM, BEA, Silverstream, including IBM, BEA, Silverstream, etc., which all have variables, but the roots are Sun pairs. Exclusive control of Java technology.

At the same time, because J2EE's step is difficult to support Web service support, major manufacturers have developed the Web service support of the Java platform, and IBM is flying in this field. Its WSAD (WebShpere Studio Application Developer integrates a lot of self-evolving " From Apache.org, but the predecessor of this project is IBM initiated, and then handed over to Apache.org's Web service components, which has become the best development tool for developing Web services in Java, and IBM's WebSphere slowly to Web services. Develop the role transformation of the deployment application platform. For Microsoft's .NET, although from the beginning, Microsoft appeared in the platform market with exclusive, monopoly, and unopened image. However, its .NET has exhibited unprecedented open gestures.

The main development language of .NET C # has been submitted to ECMA, starting standardization, ECMA is an international standard organization that is committed to the promotion of non-specific suppliers using information and communication technology within the industry. C # standardization enables companies that can implement C # programming tools on any platform to achieve their desire. Microsoft also submitted a subset of Microsoft .NET framework to Ecma, called CLR (public language architecture, Commiture Infrastructure). This will enable other vendors to implement CLIs on various platforms to use the software provided by the basic architecture model provided by the .NET framework to create a variety of tools on a variety of platforms. US Ximian has launched an open source version .NET development project called Mono in July 2001, the plan includes a C # compiler, with Microsoft's CLI-compatible class library and Linux version CLR compiler. Although this is just starting, no one can definitely, it will not be like the small toys from Sun, which will become such an important development platform like the original Java.

WEB service specification control

Since the various techniques of Web services are first developed in a standardized form, then the major developers are delivered. Therefore, if a developer participates in a certain Web service specification from a beginning, its platform can support this web service specification at the fastest speed. At this point, Microsoft gives people an impression of very active progress. In the field of Web service, Microsoft and IBM jointly pushed a large number of web service specifications. In a period of time, market promotion activities of two companies WEB service technology are jointly held, and it is not difficult to see that the two companies behind this field. Strategic partnership. The initial Web service core technology SOAP, WSDL is mainly developed by these two companies; later UDDI is developed by many of these core companies headed by these two core companies; then some of them are not the core web service specification, such as WS-Inspection, WSFL, WS-Security, WS-ROUTING, WS-LICENSE, WS-REFERRAL, etc., is completely made by these two, it is not difficult to see IBM and Microsoft's contribution to Web services and their control for web service specifications.

Since playing an important role in the development of XML specification, SUN has become very weak in its subsequent Internet specifications, especially the WEB service specification, and does not seem to improve trends. A big thing in the field of Web services is the foundure of WS-i.org. WS-i.org is an organization established to ensure the interoperability of the Web service, mainly is to develop relevant specifications for the interoperability of Web services, and conduct tests for specifications. WS-i.org's core members include Accenture, BEA, HP, Intel, IBM, Microsoft, Oracle, SAP, etc., Sun is not in it, or not in the list of non-core members. Is the SUN's development strategy, or the troubles of profitability, we are unknown, but we can know that Sun is once again behind the web service field, and the J2EE specification of the J2EE is also ideal. I know. Potential market

From the development of technology, large enterprise users or business users with successful implementation of experience will blindly negate their old technologies because of the introduction of new technologies. They are always under the premise of protecting investment, without overthrowing existing Under the premise of architecture, there is a selection of suitable techniques.

J2EE is already a mature, successful enterprise-level application solution, has a large number of customers, and companies that have implemented J2EE are unlikely to meet J2EE in the Times of the web service. Net. .Net is a new architecture, although its development language already contains traditional development languages ​​such as VB, C , developers who have just contacted .NET will only smoothly transfer the code developed by VB to .NET platform Come up. In fact, VB.NET's syntax and VB 6.0 have a fundamental difference, and it is said that VB.NET is the upgrade of VB 6.0, it is better to say that VB.NET is the Basic version of C #. Due to the structure of the CLI, VB.NET will be difficult to comply with the previous VB 6.0 code, and a large VB code cannot be transferred smoothly to .NET, we look forward to Microsoft to provide a conversion program to implement code upgrades. Although the upgrade in the source code is not so easy, but developers can still re-package the original COM components under the .NET platform, form the web service components under the .NET platform, and .NET's entire The high-intestinal and friendly development environment of the development tool will also impress the developers. In the Java field, both Borland's JBuilder 6, or Sun's Forte for Java, or IBM's WebShpere Studio Application Developer, Visualage for Java could not reach the productivity of VS .NET. The development tool is a major advantage of .NET, and the .NET platform supports the support of the web service specification, only the IBM J2EE platform is comparable to it.

Therefore, the author believes that in large enterprise applications, if the J2EE architecture has been used, the J2EE architecture should be continued in the era of Web services. It is originally to use Microsoft architecture, and most of them will still use Microsoft .NET for technical continuation. Those enterprise applications that use other technologies will investigate two architectures in different indicators such as development efficiency, security, reliability, and maintenance. It should be said that opportunities are equal, J2EE is strong in a large number of applications, and .NET strong development deployment environment in integrated integration.

In the medium and medium-level application, J2EE's share is no longer so obvious. On the one hand, Microsoft specializes in Microsoft specializes in this area; on the other hand, Java solution is so deeply in the heart, even SMEs will consider J2EE. Architecture, in this field, both in autumn.

In the field of desktop applications (Web service client), except for some management clients to use Java development, the vast majority of applications will undoubtedly develop and deploy them on Microsoft platforms. Who is the master?

The following table summarizes the comparison of both:

Compare items? J2EE? .NET?

Support for Web services?

Service description? Ok?

Service implementation? Good? Good?

Service release, discovery and binding? Good? Good?

Service call and execution? Ok?

Third party support?

Platform supplier? Very good? Is it waiting for inspection?

Software developer? Very good? Ok?

Control for web service specifications? Complicated (note)? Very good?

market expectation?

Enterprise-class large-scale application? Very good?

Small and medium-sized application? Well?

Desktop app? Poor? Very good?

Note: J2EE's controller SUN has little control capabilities for web service specification, but Sun's partner IBM on J2EE has powerful control for web service specifications, so the form is complicated in the form.

From the form, it is not difficult to see that the two are the opponents of the flag, and now they will come to the next morning. It should be said that J2EE needs to be done now, and the Web service specification is integrated into the J2EE specification as soon as possible to set up a unified support for Web services from the specification. And .NET urgently needs to increase the openness of the platform, strive to improve Microsoft, unilaterally controlled, and unopened in Microsoft.

In a long period of time in the future, J2EE and .NET will be an important choice for enterprise build applications. The two platforms will coexist with each other, and the two are constantly rejected each other and improve each other, and is expected to achieve interoperability through the web service. The real market is the need for a strong competitor, so users can get the best technology and solutions.

Small information

Gartner Group predicts the development of future Web services:

In 2001, the web service architecture platform and development tools will be basically developed by major developers. Developers can purchase these service-oriented development tools, while the actual web services are started.

In 2002, commercial web services will appear in large numbers, and a large number of B2C web services for consumers will be put into use.

In 2003, the UDDI Registry will become more and more important with the development of web services, and commercial data is increasingly rich. Private UDDI registry will be put into use to support the exchange of internal service information. The government's Web service application will also appear.

In 2004, various companies will generally accept web-based business application models, and the computing model in service concentration will enter your youth. Private UDDI Registry is still in advantageous position in various applications, new profit models and business channels will be seen everywhere. 40% of financial finance services will use Web service models, while 35% of online government services will be available in the form of Web services.

In 2005, public UDDI registration centers will use a large number of exchange mechanisms as public business information. Dynamic services also put a lot of use.

转载请注明原文地址:https://www.9cbs.com/read-60761.html

New Post(0)