In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how the complete architecture of JavaEE is, concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
JavaEE is a set of consistent industry standards for enterprise-level Web application development using Java. The JavaEE platform provides a component-based approach to accelerate the design, development, assembly, and deployment of enterprise applications. Compared with Microsoft. Net, Sun's Java*E and a series of standards, technologies and protocols are closer to or more meet the requirements of the Internet for openness, distribution and platform independence in intelligent Web services.
13 core technical specifications of JavaEE:
1. JDBC (Java Database) database connection
JDBC is a group of Java API used to execute SQL, which provides a unified way to access different databases. Almost all relational database vendors (DBMS) provide JDBC services or drivers. JDBC's access to the database is also platform independent.
2. Naming and directory interface of JNDI (Java Naming and Directory Interfaces) Java
JNDI is an abstract interface set of named directory services, which provides a unified and standardized connection for enterprise applications, so that Java can seamlessly obtain any catalogable enterprise information. In JavaEE system, JNDI is used to locate all kinds of objects, including EJB, database driver, JDBC data source and message connection. Because JNDI is independent of the directory protocol, you can also use JNDI to access a variety of specific directory services, such as LDAP (lightweight Directory access Protocol) and NDS (Server Directory access Service).
3. EJB (Enterprise JavaBean)
EJB components: JavaBean is a reusable component that can be visually processed in the programming environment (IDE). It is a Java component that implements distributed business logic. When we develop, we can use these components to build object-oriented distributed applications like building blocks. EJB container: it is the running environment of EJB components, providing services for deploying EJB components, including transactions, security, network publishing of remote clients, resource management, etc. EJB server: a high-end process or application that manages an EJB container and provides access to system services. The one that invokes the EJB component should be called the EJB client, which can run in the Web container.
4. RMI (Remote Method Invoke) remote method call
The RMI protocol allows objects on one Java virtual machine to call methods on objects in another Java virtual machine as if they were local objects. It uses serialization to transfer data between the client and the server. RMI is a lower-level protocol used by EJB. (the stub/skeleton layer provides an interface for clients and services to interact with each other.)
5. Java IDL (Interface Description Language) / CORBA (Common Object Broker Architecture) Java Interface definition language / Common object request Agent Architecture
IDL is a computer language used to describe the interface of software components. IDL describes interfaces in a neutral way so that objects running on different platforms and programs written in different languages can communicate with each other.
6. JSP (Java Server Pages)
The JSP page consists of HTML code and 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 client's browser. JSP can use the API provided by Servlet, usually in conjunction with JavaBean, to separate the interface presentation from the business logic.
7 、 Servlet
Servlet is a small Java program that extends the functionality of the Web server. As a server-side application, execution starts when requested. Most of the functionality provided by Servlet is similar to that of JSP, but in a different way. JSP is usually a small amount of Java code embedded in most HTML code, while servlets is written entirely by Java and generates HTML.
8. XML (Extensible Markup Language) Extensible White markup language
XML is a markup language for tagging electronic documents to make them structural. It is used to share data in different business processes. The development of XML and Java are independent of each other, but it and Java have the same goal, namely platform independence. Through the combination of Java and XML, we can get a perfect solution with platform independence.
9. JMS (Java Message Service) Java message service
JMS is the message service of Java, and the clients of JMS can transfer messages asynchronously through JMS service. The application program interface (API) that JMS uses to communicate with message-oriented middleware. It supports both peer-to-peer domains, domains that support publish / subscribe (publish/subscribe) types, and supports the following types: approved messaging, transactional message delivery, consistent messages, and persistent subscriber support. JMS message system brings benefits: 1, provide message flexibility; 2, loose coupling; 3, asynchrony.
10. JTA (Java Transaction API) Java transaction API
In JavaEE applications, transaction is an indispensable component model, which ensures that users operate ACID (atomic, consistent, isolated, persistent) attributes. For large applications that span data sources, such as multiple databases, or databases and JMS, a global transaction JTA must be used. The application system can access all kinds of transaction monitoring by the standard API defined by JTA. JTA provides distributed transaction services for the JavaEE platform, which isolates transactions from the underlying resources and implements transparent transaction management. 11. JTS (Java Transaction Service) Java transaction service
JTS is a component transaction monitor. JTS is the basic implementation of CORBA OTS transaction monitoring. JTS specifies how the transaction manager is implemented. The JTS transaction manager provides transaction services for application servers, resource managers, independent applications, and communication resource managers.
12 、 JavaMail
JavaMail is an API for accessing mail servers. It provides a set of abstract classes for mail servers. Supports not only SMTP servers, but also IMAP servers and POP servers.
13. JAF (JavaBean Activation Framework)
JavaMail uses JAF to handle MIME-encoded mail attachments. The byte stream of MIME can be converted to a Java object or from a Java object. Most applications do not need to use JAF directly.
JavaEE software development architecture
Two-tier architecture
The traditional client-server system is simply based on two-tier system, that is, the client (foreground) and the enterprise information system (background), without any middleware, and the business logic layer is mixed with the presentation layer or data layer. In terms of development, deployment, expansion and maintenance, this two-tier architecture has only one characteristic-high cost.
Three-tier architecture
The three-tier architecture divides the system into presentation layer, logic layer and persistence layer. The presentation layer consists of client components and their containers that handle user interaction; the business logic layer consists of components that solve business problems; and the data layer consists of one or more databases and can contain stored procedures. This three-tier architecture eliminates the need for complex database processing when processing client requests; transparently performs many tasks for the client, such as querying the database, executing business rules, and connecting to existing applications; and can help developers create large-scale distributed applications suitable for enterprises.
MVC
In MVC mode, the application is divided into three parts: model layer (Model), view layer (View) and control layer (Controller). The MVC model is to separate and layer the development of an application according to business logic, data and view and organize the code. MVC requires that the application model is extracted according to certain hierarchical rules, and the business logic is gathered into a component. While improving and personalizing the customized interface and user interaction, there is no need to rewrite the business logic. The model layer is responsible for encapsulating the state of the application and realizing the function, the view layer is responsible for presenting the content to the user, and the control layer is responsible for controlling the request sent by the view layer and the flow of the program. Servlet+JSP+JavaBean (MVC) mode is suitable for the development of complex web applications. In this mode, Servlet is responsible for handling user requests, JSP is responsible for data display, and JavaBean is responsible for encapsulating data.
MVC based on JavaEE architecture pattern in this architecture mode, the model layer (Model) defines the data model and business logic. In order to separate data access from business logic, reduce the coupling between code and improve business accuracy, the model layer is divided into DAO layer and business layer, DAO is Data Access Object, its main function is to encapsulate the code accessing the database, so that the code will not appear in other layers or exposed to other layers. The business layer is the most core and valuable layer of the whole system. This layer encapsulates the business logic of the application, processes data, pays attention to customer needs, and accesses the original data or generates new data in the process of business processing. The DAO class provided by the DAO layer can help the business layer to complete data processing. The business layer itself focuses on the understanding of customer needs and the adaptation of business rules. The DAO layer does not deal with the business logic, but only provides assistance for the business layer to complete operations such as obtaining the original data or persistence layer data.
JSP:JSP is used to generate dynamic content of Web. This layer presents the application data to the browser in the form of a web page, and then the data is represented in a predetermined way developed in JSP, which can also be called the layout layer.
Servlet:JSP is based on Servlet, and Servlet is an important part of J2EE. Servlet is responsible for handling user requests. All configurations of the Java Web project are written in the web.xml configuration file. When the project is running, web.xml maps the http request to the corresponding Servlet class.
JavaBean: consists of Java classes with private properties that provide get and set methods. JavaBean is responsible for the data and handles the communication between the view layer and the business logic.
Service: a business processing class that performs some preprocessing of data.
DAO: data access layer, where JDBC calls stored procedures, fetches data from the database (DataBase), and encapsulates it into Model entity classes.
The above is what the complete architecture of JavaEE looks like. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.