Home  >  Article  >  Java  >  A brief introduction to JavaEE with pictures and texts

A brief introduction to JavaEE with pictures and texts

黄舟
黄舟Original
2017-07-20 14:13:591758browse

This article mainly introduces the introduction to JavaEE. The editor thinks it is quite good. I will share it with you now and give it as a reference. Let’s follow the editor and take a look.

Before we go deep into J2EE, let’s take a look at the overview:

Multitier Application (Multitier Application) —— Multi-tier applications (or multi-tier architectures) are divided into multiple logical parts, mostly implemented on multi-tier servers. For example, three-tier application model: user and browser, application server, database server. The application server and database server handle application requests on different servers.

Multitier Service - Taking the service of the three-tier architecture model as an example, the application server responds to the user's request. The database server responds to queries from the application server.

Java Bean - consists of some Java classes that contain private properties and provide get and set methods to the outside world. Technically, these classes must have a parameterless constructor and implement the Serializable interface.

Concepts of J2EE 5

Java EE Application Model - This model describes a multi-layer architecture for implementing services. "What is a service" has no clear boundaries. In fact, service is just a logical concept, and its corresponding entity depends on the concept implemented by the application. For example, the client/server model is a service.

Java EE Service - This is an application service example of a three-tier architecture in J2EE. It is composed of the web page layer (serving JSP pages) and the transaction layer (managing the enterprise's data layer).

Java EE Components - "Components" refer to independent software units that can be combined with other components to build an application.

  1. Web Component - a page generated by the web side or a response to a user request. Representative ones are: Java Servlets, JavaServer Faces and Java Server Pages.

  2. Applet - a small Java application that can be returned to the user as part of the response. This program can be run on their browser. This small program is a competitor to Javascript.

  3. Client program (Application Client) - for example, a desktop application written in Java.

  4. EJB (Enterprise Java Beans) – see below.

Java EE Client - This concept contains three other concepts:

  1. Web page Client (Web Client) or thin client (thin client) - In the past (not very long ago), the web page returned by the client's request would contain script code, which would be executed on the application server and then return the results. to the client. This is the EE client. For example, users can look up employee information and sort the results the way they like. Nowadays, most developers don't use scripts in their web pages because it's not a good practice. They prefer to use MVC design principles, which prohibit the use of scripts in web pages.

  2. Applet

  3. Application Client

Java EE Server Communication (Java EE Server Communication) - This refers to the communication that occurs on the server between small clients and application clients. Typically, small clients and applets communicate in the Web layer, but application clients communicate in EJB. Don't you think this is clear enough? Do you find this troublesome? now it's right! This is why REST and MVC design principles are now popular in development.

EJB (Enterprise Java Beans, Enterprise Java Beans) - This is a logical concept and has nothing to do with traditional Java Beans. It mainly attempts to compress transaction logic from the backend (that is, the server side) of multiple applications. One of the problems it attempts to solve is ensuring the integrity of transactions in the database. Warning: There are multiple versions of EJB, and version 3.0 has been separated from earlier versions.

JavaBean Component - A synonym for Java Bean, mainly used in the JSP paradigm.

Java EE Container (Java EE Container) - This is where Java EE components are deployed and assembled (that is, the application server). It defines Web containers (containing servlets and JSPs), EJB containers (containing enterprise-class Java Beans), and application client containers (running independent applications) and applet containers running on the browser.

Deployment Descriptor (Deployment Descriptor) - This is an XML file that provides deployment information for a packaged application.

SOAP (Simple Object Access Protocol) - This is a protocol for transmitting information through services provided by the network. Messages are constructed via XML and can be exchanged through multiple transport layers, in most cases HTTP. SOAP is a competitor to JSON and REST-like services.

WSLD (Web Service Description Language) - It uses XML files to describe network services (name, location, communication mode).

UDDI (Universal Description, Discovery and Integration Service, Universal Description, Discovery and Integration) - An ebXML specification that can publish information about products and services online.

Java Servlet——It is a small server-side program written in Java, which can process the user's HTTP request and return the result.

JSP (JavaServer Page) - A method that can generate static content based on HTML file (which is a template) processing. Can include snippets of script code to be generated in the final generated script static file.

JSTL (JSP Standard Tag Library, JavaServer Page Standard Tag Library) - A set of standard tags used in JSP that can imitate the functions of script code. For example, loop through clients and display their corresponding information. Now, in JSP, such tags have replaced script code. Generally used to generate pages that need to be populated with information.

JSF (Java Server Face) - JSP page containing JSF tags (similar to LSTL tags). Additionally, JSF allows navigation modules to be defined in the page (similar to Spring web flow), including Facelets.

Facelets——Facelets is the MVC view part of JSF. Its main function is to convert templates into HTML files using provided data (e.g. client list). It can also extract part of the generated file (such as the HTML body) and put it into another template, which is equivalent to Sitemesh.

The Java API for XML-based Web Services (API used to create XML-based Web in Java, JAX-WS) ——For Web services that use XML communication is crucial.

The Java API for XML Binding (API serialized to XML, JAXB) - A way to convert between JavaBeans and XML files.

JTA (Java Transaction API, Java Transaction API) - Draw a clear line between upstream and downstream communication in the database.

JMS (Java Message Service, Java Message Service) - This API ensures reliable and asynchronous communication between servers and applications on the network. ActiveMQ implements JMS.

JavaMail API - Provides a way to send emails through applications.

JAXP (Java API for XML Processing) - Provides a way to process XML files.

JAXR (Java API for XML Registries) - An API that can register XML that contains metadata.

JDBC (Java Database Connectivity) - This API allows applications to access the database directly through SQL communication.

JCA (J2EE Connector Architecture, Java EE Connector Architecture) - enables applications to communicate with information systems (usually databases).

JPA (Java Persistence API, Java Persistence API) - This is an ORM (Object/relational mapping) definition for storing objects in a database.

JNDI (Java Naming and Directory Interface) - A way to store and retrieve resources or find information by name.

JAAS (Java Authentication and Authorization Service) ——A way to identify and control service permissions.

Concepts of J2EE 6

In J2EE6, a large amount of configuration can be performed in the source code.

JAX-RS - API that defines services such as REST (including state transfer).

Managed Beans - A Java object that can execute embedded code. In the Sping framework, these are objects with the @Autowired annotation added.

CDI (Contexts and Dependency Injection for Java EE) - CDI is the de facto API for Java EE's entire next-generation type-safe dependency injection. In the Sping framework, applications can design application context, inversion of control (IoC) and dependency injection capabilities (DI).

Bean Confirmation - Determine whether the status of Java Beans is valid through the set rules.

JACC (Java Authorization Contract for Containers) ——A connection agreement defined between the J2EE application server and a specific authorization authentication server.

JASPIC (Java Authentication Service Provider Interface) - This is the SPI (that is, service API, Service API) that is complementary to JACC for authentication. It defines how applications pass traditional authentication services.

Generally speaking, J2EE and Spring framework are slowly developing in the same direction.

The above is the detailed content of A brief introduction to JavaEE with pictures and texts. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn