Development model and implementation of e-commerce based on Java EE

Source: Internet
Author: User
This paper introduces the architecture of Java EE, improves the architecture of Java EE, puts forward and realizes the model of e-commerce development based on Java EE, which can effectively solve the problems of performance and maintainability in e-commerce system.

keywords J2EE;EJB; architecture; e-commerce

With the popularization and development of the network, e-commerce plays an increasingly important role in the current network era. E-commerce from the initial static E-commerce has developed to today's dynamic e-business. Dynamic e-business can dynamically adapt to the changing business strategy of the e-business process and related systems, reflecting the implementation of real-time application dynamic integration concept. The characteristic of dynamic e-commerce is that the software should be designed into reusable and flexible components according to the business process. Using the idea of browser/server structure and component, Java-EE technology is independent of business logic from client and server side, adapts to the need of increasingly complicated and changing business logic, and can fully meet the development demand of dynamic e-commerce.

1 Java EE architecture
Java EE is an architecture for simplifying the development, deployment, and management of complex issues related to enterprise solutions by using a java-based 2 platform that can be used to develop large, multi-level, and distributed enterprise-class applications. Java EE uses the layered structure, the layer and the layer are independent mutually, each level provides the specific service. In a hierarchical structure, the implementation changes have no effect on other layers as long as the interfaces provided by them are unchanged. Layered features not only make each layer simple and easy to implement, but also have better maintainability and scalability.


Figure 1 Java EE architecture

As shown in Figure 1, the Java EE architecture is divided into the following layers:
(1) Client tier clients display the requested information to the end user through a browser or client application.
(2) The middle layer is responsible for the representation and realization of logic. The middle tier is divided into two layers, namely the web layer and the business logic layer.
The Web layer uses servlet and JSP components to send client requests to the EJB component of the business logic layer and send the processing results to the client. The business logic layer consists of several EJB components that run on the EJB server, which is responsible for processing client requests. EJB is an object-oriented component that is used primarily to develop, implement, and deploy distributed logic.
(3) The Enterprise Information System layer runs enterprise information system software, mainly is the database system.
The Java EE architecture provides a modular approach and high-performance multithreaded environment for component-based design, development, and deployment of enterprise applications by separating performance logic, business logic, and back-end data services.

2 e-commerce development model based on Java EE
Java-EE technology adopts the distributed component idea, which is suitable for the development of e-commerce system, but there are some problems in the development of e-commerce system using Java-EE technology, which is embodied in the following aspects.

1 The client browser calls the back-end server's business object through the remote interface, which costs network overhead. If there are too many method calls between the client and the server, this can cause network performance problems.
2 e-commerce system has a large number of users, users and server-side business objects of the interaction between the network will bring great pressure, so that the system can be greatly damaged, serious may lead to systems crashes.
3 The relationship between the layers is too close, the client and the back end of the business object has a strong dependence on the system is not conducive to the management and maintenance. Direct interaction between client and business objects leads to too much connection between the two, and also makes the client too dependent on the specific implementation of the business object and is responsible for managing the business object lookup and creation associated with the interaction process, and the relationships that are invoked between different objects. This will require the client to do too much on this component, thereby reducing the maintainability of the system.
In order to solve the above problems, this paper improves the architecture of Java-EE based on the actual situation of e-commerce development, and puts forward the model of e-commerce development on the basis of Java EE, whose structure is shown in Figure 2.


Figure 2 E-commerce development model based on Java EE

The e-commerce development model based on Java EE is divided into four layers, namely customer layer, Web layer, business layer and enterprise information System layer. Among them, the customer layer for the electronic commerce system through the browser to access the network end users, generally divided into general users and members and administrators. General users and members can access the E-commerce system for information inquiries and product orders, and other operations, while the Administrator is responsible for E-commerce Systems management and maintenance.

The web layer implements interaction with the customer layer, handles requests from the customer layer, and responds. The Web layer provides two interfaces to the customer layer, namely the E-business system interface and the management interface. All users of the customer layer can access the e-business system through the E-business system interface, while the management interface can only be accessed by the administrator, and the general users and members do not have this permission. The functionality of the Web layer implements the expression of user-processed data through a Web component.

The business layer realizes the interaction with the Web layer and handles the data processing request of the Web layer, which is the core layer of the model. The model encapsulates the business object of the business layer so that the Web layer does not directly access the EJB component, but rather accesses the EJB component through system access to session beans and subsystem session beans.

The Enterprise Information System layer runs enterprise information system software, such as enterprise resource planning, mainframe transaction processing, database system and other legacy information systems. The Enterprise Information System layer realizes the interaction with the business layer, and generally handles the database operation of the business layer.

 3 implementation of e-commerce development model based on Java EE
The core of e-commerce development model based on Java EE is the business layer, which is implemented as follows:

Figure 3 Access process for EJB components in e-commerce development model based on Java EE

Related Article

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.