J2EE architecture
Compared to the .NET platform, Sun's standard defined J2EE architecture has little space that can be discussed because there is nothing to discuss. If a person pays attention to a specific developer's product, such as IBM's WebSphere, then seeing the biggest part of its technology is dedicated to WebSphere. Comparing all developers' specific improvements to J2EE, it has exceeded the scope of this article. In my experience, most companies that are interested in J2EE as a platform are interested in the variable value of this standard. Anyone who is interested in variable value will need to limit themselves to the standard defined by Sun.
The J2EE architecture can be divided into 5 parts:
Java language system client program design model intermediate layer infrastructure programmer enterprise API non-programmer visible API
In the last part, non-programmers can see API, including how to insert other products into J2EE API, such as connector API, and recently improved effective alternative APIs in the J2EE model, such as JTA (Java Transaction API). Since the non-programmer visible API is not important from the perspective of Compare Microsoft and Sun Planning, the API will not be involved in the author's overview (just like the API involved in the Net platform overview. same).
Java language system
At high level, Java language system looks similar to .NET Framework. In both cases, the source code is translated into an intermediate language. However, in the .NET platform, this intermediate language is MSIL, and in the Java system, it is Java Byte Code. In both cases, the intermediate language is brought into the operating environment. In Framework, the operating environment is Common Language Runtime. For Java, the operating environment is a Java Virtual Machine. Overall, Common Language Runtime and Java virtual machine have similar functions, and in terms of technical advancement, there is no doubt in development and interaction with each other.
The most important difference between the two systems is related to the translation of the source code to the intermediate language. In the .NET platform, the intermediate language is designed to adapt to the needs of various languages. In Java, the intermediate language is designed to meet the needs of Java. Although in theory, it is possible to generate Java Byte Code from a language other than Java, but it is actually not proven in any commercial product.
Client program design model
The J2EE client program design model focuses on interacting with the browser. The client programming model has 3 parts: Java Applets, Java Servlets, and Java Server Pages.
Java Applets is used to pack Java code running in the browser. In the .NET platform space, this is functionally equivalent to ActiveX. In the experience of the author, Applets or ActiveX components are relatively relatively small. The e-commerce architecture is generally based on a browser that issues a request to the representation, and then the layer is then responding to the HTML page. This system does not use ActiveX or Java Applets, so the author does not discuss any of these technologies in this white paper.
Important technology for processing HTTP requests and HTML responses is Java servlets [1] and Java Server Pages [2]. These two technologies are similar to ASP.NET (Active Server Pages) in Microsoft Space.
The main difference between the .NET platform and the Java representation layer is to process different client functions. Java represents the previous Microsoft ASP (Pre .NET) model, which makes the responsibility of the layer programmer to determine the final destination browser (or other thin client system), thin client system function, and how to generate HTML will give full play to the advantages of thin client systems. Intermediate layer infrastructure
For J2EE, the intermediate layer infrastructure is Enterprise Java Beans (EJB). The current version of this specification is 2.0, which can be obtained from the Internet [3]. The .NET platform is COM with J2EE.
There is very little difference between the architecture between EJB and COM . These two architectures are essentially derived from MTS (Microsoft Transaction Server), which is the initial facing intermediate layer infrastructure introduced by Microsoft in 1996. Important ideas that are first introduced by MTS and then merged into EJB and COM include:
High scalability implemented by sharing of component examples
Safety Automatic Transaction Boundary Management with Intermediate Layer
EJB joins a new architecture idea, a technology that automatically manages component status. This technique is called Entity Beans (entity beans). Although this idea is attractive, the current implementation depends on the intermediate layer data cache independent of the database. Unfortunately, there is no mechanism for consistency between these two caches. This means that any use of physical beans will bring high risk of database damage. Before the solvement of cache consistency, the physical bean technology must be considered in consideration of solid beans.
To connect the in-depth comparison of EJB and COM , see the recent books of the author [4].
Programmer enterprise API
The most important part of our calling Java Enterprise API is as follows:
Java Database Connection 2.0 - is API [5] for accessing relational databases from Java. This is quite equivalent to the ADO.NET in the .NET platform space. Java Naming and Directory Interface (JNDI, Java Named Directory Interface) - API for accessing the company name and directory service from Java. This is a bit similar to the Active Directory Services Interface (ADSI, Active Directory Service Interface) in the .NET platform space.
Java Message Service (JMS, Java Message Service) 1.0 - is a Java API [7] for asynchronous workflow. This is functionally equivalent to the Microsoft Message Queue API, which is already alternative to the queuing component.
J2EE: Combine everything together
Figure 4 shows the relationship between the main part of the J2EE, which can be compared to Figures 3 and 3. Figure 3 shows a comparable image description of the .NET platform, which shows a quite general architecture.
[1] Java servlet 1.2 specification can be obtained at http://java.sun.com/products/servlets.
[2] Java Server Page 1.2 Specification can be obtained at http://java.sun.com/products/jsp.
[3] See http://java.sun.com/products/ejb/docs.html.
[4] COM AND THE BATTLE for the Middle Tier, Roger Sessions, John Wiley and Sons released in January 2000
[5] Manual can be obtained at http://java.sun.com/products/jdbc.
[6] Manage can be obtained at http://java.sun.com/products/jndi. [7] Manual can get at http://java.sun.com/products/jms.