Java EE Introduction

Source: Internet
Author: User
Tags web services

1. Why do I need Java EE

In our JSP code, because a lot of display code and business logic confused together, nesting each other, not conducive to the maintenance and expansion of the program. When business requirements change, for programmers and artists is a heavy burden.

For program maintainability and scalability, this requires us to use Java EE Technology for project development

2. What is Java EE

Java EE is a specification and standard for developing distributed enterprise-class applications.

The Java language platform has 3 versions: Javame for small devices and smart cards (Java Platform Micro Edition,java miniature), Javase for desktop systems (Java Platform Micro, Java Standard Edition), Java Platform Enterprise Edition,java Enterprise Edition for enterprise applications.

3, Java EE included in the technology

Java EE applications are composed of components. The Java EE component is a self-contained unit that is assembled into Java EE applications through related classes and files and interacts with other components.

Java EE includes the following technologies: Web Service, Struts, Hibernate, Spring, JSP, Servlet, JSF, EJB, JavaBean, JDBC, JNDI, XML, Javase.

4. What frame

Frame is the framework, we can understand the framework as a kind of application of semi-finished products, is a group of components for users to select, complete the user's own system. Simply put, use someone else's prepared components to implement your own project.

5, Java EE and the relationship between the framework

Framework technology is formed on the basis of Java EE, and applications are created on the basis of a framework.

6. Java EE architecture

The three-tier structure of the application is as follows:

Presentation layer: The code consists of the user interface and the user-generated interface.

Middle tier: Contains the business and functional code of the system.

Data layer: Responsible for the completion of access to the database data and encapsulation of the data.

The advantages of the three-tier architecture:

Changes to one component do not affect the other two components. For example, if a user needs to replace a database, only the data-tier component needs to modify the code. Similarly, if you change the user interface design, only the presentation layer component needs to be modified.

Because the presentation layer and the data layer are independent, the presentation layer can be expanded conveniently and the system has good scalability.

Code duplication is reduced because the code is shared as much as possible between 3 components.

Good division of labor and collaboration. This will enable different groups to independently develop different parts of the application and give full play to their strengths and strengths.

7. Java EE Technical Content

Java EE technology architecture can be divided into: presentation layer technology, middle tier technology, data layer technology. Java EE also involves some techniques for system integration.

7.1. Presentation Layer Technology

Html

Javascript

Ajax

Ajax is the integration of several technologies. The main function of Ajax is to send requests asynchronously to the server, process the data, or display the page again based on the returned data.

7.2. Middle-tier technology

Jsp

A Server Web page that displays dynamic content.

Servlet

A Java program that receives client requests and responds.

The servlet is an important part of the middle-tier technology, and it controls other components.

Jstl

The secondary JSP displays the standard tag library for dynamic content.

JavaBean

A model component of Java EE.

Framework technology of the middle tier

Struts framework: Struts mainly extends the servlet.

7.3. Data layer Technology

JDBC Technology

JDBC (Java Database Connectivity): Java DB connection.

Use JDBC to manipulate tables and data in the database.

Data-Layer Framework technology

Data-tier framework, Hibernate provides the ability to manipulate relational database data in the form of objects.

7.4. System Integration Technology

In some large projects, the entire application is divided into several modules, developed by different development team synchronization, it is possible that they use the technology is different, in each functional module development end, the thing to do is to put these fragmented modules, integrated into a whole, this is what we are customers want, At this point we are going to use the technology for system integration (Web Service).

JAX-WS Technology

Jax-ws (Java API for XML Web Service) is an important part of the Java EE platform.

Jax-ws simplifies the work of developing Web services using Java technology.

Jndi

JNDI (Java naming and directory Interface,java naming and catalog interfaces) is a set of APIs that access the naming and directory services in Java applications, where the naming service links objects to names, and can find the appropriate objects by name.

8, HTTP (hypertext Transfer Protocol, Hyper-Text Transfer Protocol) protocol

HTTP is a stateless protocol that is based on the client/server model. HTTP clients, such as browsers, need to establish a connection to the server and send a request message over the connection to the HTTP server to request the appropriate resources. The server then returns a response message with the requested resource. When the response is complete, the connection is disconnected and no connection information is saved. So HTTP is a stateless protocol.

HTTP uses ports to send and receive messages. A port is a channel or mechanism by which a protocol sends and receives data. Port 80 is developed for HTTP and is primarily used to transmit information on the WWW (World Wide Web) service. Browse Web Services The default port number is 80.

9, using the data monitoring tool provided by MyEclipse TCP/IP monitor for data monitoring.

Configuration steps for TCP/IP monitor (TCP/IP monitors):

Windows (window)--->preferences (preferences)--->run Debug (run/mode)--->TCP/IP Monitor (TCP/IP monitors)

Note: If it is not found, the following path is searched:

Windows (window)--->preferences (preferences)--->myeclipse---> Internet Tools (Internet tool)---> TCP/IP Monitor (TCP/IP monitors)

Then select the show's TCP/IP monitor view there is activity (display the TCP/IP monitors view to see when there are requests and responses).

Click the "ADD" button to eject the new monitor window.

Local monitoring Port: fill in 8088. The native monitor port, which is the port that monitor actually listens on.

Host name: Fill in localhost or 127.0.0.1. The host name to monitor, and the settings of the Listener object.

Port: Fill in 8080. To monitor the port number that you want to listen to, your request is sent to the local monitoring port and will be transferred to it.

Type: Select HTTP. The type to monitor.

timeout:0.

Click the OK button, and then click the Start button to start the monitor.

Then start Tomcat and enter in the Address bar:

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.