Java EE core technology Overview

Source: Internet
Author: User

-The cornerstone of JavaEE:

1. EJB (Enterprise JavaBeans ):

A Java server component development Specification defines a standard method for developing object-oriented distributed application components based on which the software vendor implements the EJB server.

Java programmers can combine some EJB components to build distributed applications conveniently and quickly. The EJB specification has also done a lot of work in simplifying the complexity of distributed application development. The EJB programmer does not have to worry too much about transaction processing, multithreading, resource management, and other issues, you can focus on the business logic required to support applications without worrying about the implementation of the surrounding frameworks. By using EJB, the entire program can be clearly segmented, and EJB can use other services such as EJB or JDBC, thus enhancing the scalability and performance of distributed applications. In addition, the use of ejbs enhances the reliability, manageability, and portability of the entire system program.

 

EJB components

There are three types of ejbs: Session ejbs, entity ejbs, and message-driven ejbs.


EJB container

It is the running environment of EJB components and provides various services for the deployed EJB components (such as transactions, security, network release of remote clients, and resource management ). Container vendors can also provide additional service interfaces in containers or servers.


EJB Server

Manage high-end processes or applications of EJB containers and provide access to system services. The EJB server can also provide vendor features, such as optimized database access interfaces and access to other services (such as the CORBA service.


2. CORBA architecture: Core-ORB
CORBA technology:

Common Object Request Broker Architecture is a standard (standard) for developing distributed Object systems. It is independent of the platform and language. Developed by OMG.

In this architecture, an object can be accessed by a local customer or remote customer through method activation. The customer (an object or application) does not need to know the runtime environment of the called object (called a service object) or the programming language for implementing this object, the customer only needs to know the Logical Address of the service object and the provided interface.

The key to this interoperability is the Interface Definition Language (IDL), which describes the methods in the object Interface. These methods can be activated by other objects (or applications.

 


3. RMI technology:

RMI (Remote Method Invoke) is a more underlying protocol used by EJB. As its name indicates, RMI calls methods on Remote objects, use serialization to transmit data between objects on the client and the server.

 

Comparison between RMI and CORBA:

The key difference between the two lies in the language environment. Java RMI is a pure Java solution for Distributed Object Computing (for example, in Java RMI, object interfaces are defined in Java rather than IDL );

Secondly, the security service is not defined in CORBA, while Java RMI inherits the security of Java;

In addition, different implementations of CORBA and different independent software developers are unique, which makes matching on different platforms more difficult, in addition, not all developers of CORBA products support all platforms, and almost all platforms support Java virtual machines. Therefore, Java RMI has higher portability. If both the customer object and service object are based on the Java Virtual Machine, Java RMI is the best choice for Distributed Object Computing. Of course, IIOP (Internet Inter-ORB Protocol) has provided the interoperability between Java RMI and CORBA, and the development of the two has a trend of mutual reference.

 

4. JSP technology:

JSP is a script language on the server. It is a dynamic web page generation technology developed based on Java and Servlet. Its underlying implementation is Java Servlet.

The JSP (Java Server Pages) page consists of HTML code and the Java code embedded in it. The server processes the Java code after the page is requested by the client, and then returns the generated HTML page to the browser of the client.

 

Features: Object-oriented, cross-platform, as stable as Servlet, you can use the API provided by Servlet to overcome the shortcomings of Servlet.

Application: generally used in combination with JavaBeans to separate the interface performance from the business logic.


Comparison between JSP and ASP (1 ):

Similar:

Both are script languages running on the server, and both are dynamic web page generation technologies.

Both technologies use HTML to determine the page layout. They mix some program code in HTML code and are interpreted and executed by the Language engine. HTML code describes the display style of information, while program code describes the processing logic.

Comparison between JSP and ASP (2 ):

Different:

JSP is a technology launched by Sun. It is a Web Development Technology Based on JavaServlet and the entire java system. Using this technology, we can establish an advanced, secure, and cross-platform dynamic website. ASP is a technology launched by MS. It can only run on MS Platform, and cannot implement cross-platform or secure.

The Programming Language in ASP is a script language such as VB script, while JSP uses Java.

There is another essential difference between ASP and JSP: the two language engines process the program code embedded in the page in a completely different way. In ASP, the VB script code is interpreted and executed by the ASP engine. In JSP, the code is compiled into a Servlet and executed by the Java Virtual Machine, this compilation operation only occurs during the first request to the JSP page.

 

 

5. Java Servlet technology:

Servlets (= Server + Applet): a Java Applet running on the Web Server to expand the functions of the Web Server.

Servlets uses a specific Java solution to replace other Web Server programming modes (such as CGI and ISAPI). Therefore, it inherits all Java features (cross-platform, multi-thread, and OO ).

Servlets can be embedded in different Java Web servers. Because the Servlet APIs used to write Servlets have no special requirements on the server environment and protocols, Servlets is highly portable, it does not have performance limitations as it does in other methods such as using CGI programs.

Servlets also uses the HTTP protocol to communicate with clients. Therefore, Sevlets is also called "HTTP Servlets ".

Servlet is a simple and similar technique for extending Web server functions. It is written in Java, so it can access the entire Java API library, includes JDBC APIs used to access enterprise databases.

 

Comparison between Java Servlet and JSP:

Both are based on Java technology, so they inherit all Java features (cross-platform, multi-thread, OO) and can use powerful Java APIs.

The two work in a similar way: JSP code is first converted into Servlet code by the JSP Container and then compiled into a class.

Both work at the same level in the JavaEE architecture and are responsible for connecting to the client.


Servlets is a Java Applet running on the Web server, while JSP is a script, which is easier to write.

Servlet is mainly used to receive request information from the client, while JSP is mainly responsible for transmitting server information to the client.

The true significance of using Servlet is that the interface design and business logic design can be separated.

 

 

7. JavaBean technology:

JavaBean is a Java-based component model, which is somewhat similar to Microsoft's COM component.

On the Java platform, Java program functions can be infinitely expanded through JavaBean, and new applications can be quickly generated through the combination of JavaBean.

For programmers, the best thing is that JavaBean can reuse code, and it also has great significance for the maintainability of the program.

Java Virtual Machine (Java Virtual Machine) is used to run JavaBean. The minimum requirement for running JavaBean is JDK or later.

The traditional application of JavaBean lies in the field of visualization, such as applications under AWT. Since the birth of Jsp, more JavaBean applications have been applied in the field of non-visualization, showing more and more vitality in the aspect of server applications.

 

 

8. JDBC technology:

JDBC is a set of APIs that define a standard Java class library for accessing data sources. Using this class library, you can easily access database resources in a standard way.

The goal of JDBC is to enable application developers to connect to any database system that provides the JDBC driver, so that programmers do not need to have too much knowledge about the characteristics of specific database systems, this greatly simplifies and accelerates the development process.

JDBC APIs provide a unified way to access different databases. Like ODBC, JDBC shields developers from some details,

JDBC access to databases is also platform-independent.

 

 

9. XML technology:

XML (Extensible Markup Language) is a Language that can be used to define other Markup languages and is used to share data in different business processes.

XML Development and Java are mutually independent, but they share the same objective as Java, that is, platform independence. By combining Java and XML, you can get a perfect platform-independent solution.

The JavaEE platform fully supports and implements XML. This powerful combination can enable XML compatibility across platforms, and even tools used to perform syntax check and debugging on XML Code are not related to the platform.

Because XML can implement platform-independent data, while JavaEE platform can implement platform-independent solutions, JavaEE and XML technologies are the yin and yang poles of enterprise development. XML can express data through transplantation, which supplements the portability of Java technology.

 


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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.