J2EE comprehensive introduction (1)

xiaoxiao2021-03-06  46

First, J2EE

The concept is currently in the Java 2 platform, which is a Java 2 platform for small devices and smart cards Micro version (Java 2 Platform Micro Edition, J4ME), Java 2 Platform Standard Edition for desktop systems (Java 2 Platform Standard Edition, J2SE, suitable for creating server applications and services, Java 2 Platform Enterprise Edition, J2EE).

J2EE is an architecture using Java 2 platform to simplify the development, deployment, and management of business solutions. The basis of J2EE technology is the standard version of the core Java platform or Java 2 platform. J2EE not only consolidates many of the advantages in the standard version, such as "writing once, run everywhere", which is easy to access the JDBC API, CORBA technology, and capable of accessing the database. Safety mode for protecting data in the Internet application, etc., and also provides comprehensive support for EJB (Enterprise JavaBeans, Java Server Pages), and XML technology. The ultimate goal is to be an architecture that enables enterprise developers to significantly shorten the market time.

The J2 architecture provides an intermediate layer integration framework to meet the needs of applications that do not require too much cost and require high availability, high reliability, and scalability. By providing a unified development platform, J2EE reduces the cost and complexity of developing multi-layer applications, while providing strong support for existing applications, fully supporting Enterprise JavaBeans, with good guidance support packaging and deployment applications, add directory support , Enhance the safety mechanism and improve performance. II. J2EE Advantage J2EE provides a good mechanism for building a commercial system with scalability, flexibility, and easy maintenance: 1. Retain existing IT assets: Since companies must adapt to new business needs, using existing enterprises Investment in information systems, rather than re-establishing a total plan. Thus, a server-side platform mechanism established on an existing system in a progressive (rather than radical, all) is the company's needs. The J2EE architecture makes full use of the original investment, such as the BEA Tuxedo, IBM CICS, IBM Encina, Inprise Visibroker, and Netscape Application Server used by some companies. This has become possible because J2EE has a wide range of industry support and some important 'enterprise calculation' domain suppliers' participation. Every vendor provides an existing customer's upgrade route for existing investments and enters the portable J2EE field. Since products based on J2EE platforms can almost operate on any operating system and hardware configuration, existing operating systems and hardware can be reserved. 2. Efficient development: J2EE allows companies to hand over some general, cumbersome server tasks to middleware suppliers. This developers can concentrate on how to create business logic, reduce development time accordingly. Advanced Middleware Suppliers offer the following complex middleware services: O Status Management Services - Let developers write less code, do not care how to manage status, this can complete the program development faster. O Sustained Services - Let developers can write applications without coding data access logic, can generate more lightweight, unrelated to the database, which is easier to develop and maintain. O Distributed Shared Data Objects Cache Services - Let developers prepare high-performance systems, greatly improve overall deployment of scalability. 3. Support heterogeneous environments: J2EE can develop portable procedures deployed in heterogeneous environments. J2EE-based applications do not rely on any particular operating system, middleware, hardware. Therefore, a reasonable J2EE-based program is designed to be deployed to a variety of platforms. This is critical in a typical heterogeneous enterprise computing environment. The J2EE standard also allows customers to order off-the-shelf components compatible with J2EE, deploy them into the heterogeneous environment, saving the costs required by themselves. 4. Scalability: Enterprises must choose a server-side platform that meets excellent scalability to meet a large number of new customers who have commercial operations on their system. Applications based on J2EE platforms can be deployed on a variety of operating systems. For example, it can be deployed to high-end UNIX and mainframe systems, which can support 64 to 256 processors. (This is the supplier of the NT server) J2EE field provides a wider load balancing strategy. Can eliminate bottlenecks in the system to allow multiple servers integrated deployment. This deployment can reach thousands of processors, achieving highly scalable systems to meet future business applications.

Stable availability: A server-side platform must be able to operate all-day to meet the needs of company customers, partners. Because Internet is global, there is everywhere, even if it is downtown at night, it may cause serious loss. If it is unexpected, there will be catastrophic consequences. J2EE deploys to a reliable operating environment that they support long-term availability. Some J2EE deployed in a Windows environment, customers can also choose a robust performance, such as Sun Solaris, IBM OS / 390. The most robust operating system can reach 99.999% availability or only 5 minutes a year. This is an ideal choice for real-time business systems. III. J2EE's four-layer model J2EE uses multi-layered distributed application models, application logic is divided into components, and each application component is distributed in different machines based on their layers. In fact, the original intention of Sun Design J2EE is to solve the drawback of two layers (Client / Server), in traditional mode, the client acts as a large role and looks bloated, in this mode, the first deployment It is relatively easy, but it is difficult to upgrade or improve, stretchability is not ideal, and often based on some proprietary protocol - usually a database protocol. It makes it difficult to reuse business logic and interface logic. Now J2EE's multi-layer enterprise application model cuts different levels in the two-layer model into many layers. A multi-layer application can provide a separate layer for each of the services, the following is a Typical four-layer structure of J2EE: a customer layer component running on the client machine.

WEB layer components running on the J2EE server

Business logic layer components running on the J2EE server

Enterprise Information System (Enterprise Information System) Software J2EE application component J2EE application is composed of components. J2ee components are software units with independent features, which are assembled into J2EE applications through related classes and files. Program and interact with other components. The following J2EE components are defined in the J2EE manual:

Application client programs and applets are customer layer components.

Java Servlet and JavaServer Pages (JSP) are web layer components.

Enterprise JavaBeans (EJB) is a business layer component.

The client layer component J2EE application can be a web-based, or may be based on a traditional manner.

The Web layer component J2EE Web layer component can be a JSP page or servlets. Follow the J2EE specification, static HTML pages and Applets are not a web layer component.

As the client layer shown below, the web layer may contain some JavaBean objects to handle user input, and send input to Enterprise Beans running on the business layer. The logic of the business layer component business layer code is used to meet the needs of special business sectors such as banks, retail, and finance. The following image shows how an Enterprise bean receives data from the client program. For processing (if necessary), and send it to the EIS layer, this process can also be reverse.

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

New Post(0)