首页
会员中心
到顶部
到尾部
文科毕业论文

Application of AJAX technology and SSH framework in development of electronic commerce system

时间:2020/10/14 14:31:27  作者:  来源:  查看:0  评论:0
内容摘要: 1. IntroductionThe characteristics of electronic commerce transaction both sides to form good interface is simple and easy on the networ...
1. Introduction
The characteristics of electronic commerce transaction both sides to form good interface is simple and easy on the network, so that the supply and demand sides thousands of miles away through the network as quickly as the face-to-face to complete the transaction, so that a variety of online transactions, the payment clearing and accounts by electronic bills, business time will no longer follow the travel time calculation, but the beginning press the "enter" moment. Online shopping system as B2B, B2C, C2C e-commerce front-end business platform, it can play a decisive role in the whole process of its business activities.
The main function of AJAX will change the traditional synchronous interaction communication between the browser client and server asynchronous interaction, thus enriching the browser client function and it is solving the browser frequently refreshed to wait for data transmission problems,improve the Web experience with the program's user.
In the framework of the SSH, the Struts is to provide the MVC model, the interface, business logic and data separation, and provides a highly scalable architecture. Struts is the realization of the presentation layer MVC framework at present the most commonly used for creating Web applications, is an open source project Jakarta Apache. The Struts framework using Model2 controller and a custom tag library will be used in the model and view separation is based on loose coupling between layers, reaches the effect, and enhances the system flexibility, reusability and maintainability.
E-commerce site needs to show all the information for the trading of goods, generally through the text, pictures, video, performance. AJAX technology has many applications in the fields of it. In the SSH integrated framework, Hibernate provides an abstract view of data services, the user access to the database is highly abstract. The paper presents application of AJAX technology and SSH framework in development of electronic commerce system.
2. The technology of AJAX and SSH framework
XMLHttpRequest in several AJAX technologies is the core technology, it is no need to refresh the page to the server transmission or can read and write data (no refresh page) key. Before using the XMLHttpRequest object to send the request and response to treatment, you must first create an XMLHttpRequest object using JavaScript [1]. Because XMLHttpRequest is not a W3C standard,examples and so can use a variety of methods to use JavaScript to create XMLHttpRequest.
This can be solved by using AJAX technology. Users fill in the login name, once the input text box loses focus, processing function will be the event through the AJAX to login to check the user fill in the existence of duplicate, and this calls are asynchronous, users can continue to fill in the registration items of the other, in the process, the transmission network is not the entire page, but a small amount of text fragments, such as user fill in the login name and the server returns the message, so the response speed is very quick.
One of the biggest characteristic of AJAX without refreshing the page to the server or can read and write data (no page refresh), this characteristic to benefit from the XMLHTTP XMLHttpRequest component object. So you can exchange as recurrent desktop applications only with the server data level, and not always update the user interface, also do not have time to work in data processing to the server to do, so that to reduce the burden on the server and speed up the response, shorten the waiting time for customers.
Based on standardized and widely supported technology, do not need to download the plug-in or small program. All popular browsers now support Ajax technology, makes it spread very smooth. To further promote the page book data separation. AJAX access server can use separate module for the operation, so that the technical staff and artists can better division of labor and cooperation.
The browser doesn't need the part to refresh the whole page can update the page, the whole process does not need to interrupt the user interaction with the application, reduce network delay to the user experience is not convenient. The user Web operation more as for desktop applications operates sensitive and rapid response of feeling. Traditional Web application and AJAX application mode as shown in figure 1.
The AJAX engine is presented and application of separation of Web page, the browser and the server asynchronous interaction. On the one hand, through the JavaScript scripting language flexibly deal with data validation, data editing user request, dynamic user interface and rely on the DOM and CSS display and formatting presents; on the other hand, through the JavaScript without the need to refresh and reloading the browser page (page presents the interaction is completely independent of the server) conditions by using XMLHttpRequest, the asynchronous server object and data exchange of the engine model.
As an open source project, Struts has a lot of practice, more and more powerful, system is approaching perfection day by day, and other technology and framework shows good fusion. In the framework of the SSH, Spring as the core, to the integration of MVC framework, ORM framework integration down, IOC using the Spring container to manage dependencies between various components between the Spring statement, the transaction management affairs will be responsible for the logic layer component.
An application may have different views, MVC design pattern to deal with the view of the limited view of data acquisition and processing, as well as the user's request, processing not included in the view on business processes. The handling of business processes to model treatment. For example, a Advanced Materials Research Vol. 952 339 view only accepts orders from the model data and display to the user, and transmits the input data and request user interface to control and model.
The SSH framework is the organic integration of Struts, spring and Hibernate three kinds of technology, is currently the most widely used Java EE architecture. In the framework of the SSH, the Struts is to provide the MVC model, the interface, business logic and data separation, and provides a highly scalable architecture [2]. Spring as the core, to the integration of MVC framework, ORM framework integration down, IOC using the spring container to manage dependencies between various components between the Spring statement, the transaction management affairs will be responsible for the logic layer component.
Hibernate is an object relational mapping framework is an open source, it is very lightweight object encapsulation on JDBC, using object-oriented programming thinking makes Java programmers can manipulate the database. Hibernate can be used in any situation with JDBC, which can be used in the Java client, can also be used in the application of Web in Servlet/JSP.
3. Application of AJAX and SSH framework in development of electronic commerce system
Research and implementation of electronic commerce system based on AJAX and SSH technology, discusses the non functional requirements of e-commerce system availability, scalability and maintainability and improvement scheme. Through the analysis of the traditional lack of business system request / response mode of user interaction, usability, presents the application of AJAX asynchronous request access technology, improve the usability of the system; hierarchical design method using MVC model to optimize the client code; combination of user access control strategy and XML technology, the rapid implementation of user demand change and bring the system scalability, allows the code to modify the degree of control in the smallest scope; powerful exceptionhandling mechanism using Java language and the log function perfect, to further ensure the system reliability and safety.
In the B/S structure system, the user sends a request to the many servers distributed across the network through the browser, the browser requests to the server for processing, the information users needed to return to the browser. B/S structure simplifies the client work; the client only needs a small amount of client configuration software. The server will take on more work, access to the database and application will be executed on the server, as shown in figure 2.
Electronic commerce website now advocating personality, pay great attention to meet the needs of users, therefore also very concerned about the interaction with the user. In response to the shopping cart system AJAX shopping cart can be obtained faster than traditional server based, such as customer order number exceeds the error message inventory do not wait until the user submits the page to know. The second is the user feedback, usually by book or discussion area, can use AJAX technology to design the exceptionally sensitive customer message board or forum. For the traditional book, refresh is on the whole message page is updated, and the AJAX guestbook, this course will bring a good user experience.340 Technologies in Materials Science, Design and Manufacturing
The presentation layer using Struts framework, Struts framework is the MVC design pattern, a clear distinction model, view and controller, simplifying the application development process. Struts core controller is realized by the ActionServlet, Struts core controller through the JSP page for client requests an Action controller based on the received ActionServlet is invoked using the model of business process to request.
Online shopping mall is divided into two parts, one part is the part of the user oriented, including:the customer register online, shopping, submit orders, payment and other operations; another part is the mall management part, this part of the contents include: add, delete, query product, order management, operator management, registered user management etc [3].
Traditionally is automatically refresh the current Webpage timer technology, in order to obtain the latest data, but when the Webpage need to change the data is not many, repeated overload will greatly reduce the efficiency of the system page. Partial refresh function so we introduce AJAX, of course,our emphasis here is locally refreshed, if is the entire page data almost have to change it, suggestions or timer refresh, because if it still blindly use AJAX, will greatly increase the complexity of the system, it is possible to run counter to one's desire. Here also the asynchronous XMLHTTP call, sends a request to the server and get the data, to the client, the client re organization and display data, the dynamic data acquisition Webpage without refresh, as is shown by figure3.
For the classification of goods display can be used AJAX based on dynamic tree structure, this structure in display, expansion, add, modify and delete operation, does not cause the page load, and only when necessary to request database, data loading, not only speed very quickly. This layer using Spring framework, to manage the business component.
Summary
The paper presents application of AJAX technology and SSH framework in development of electronic commerce system. JavaEE is the development platform of enterprise informatization is very good, this paper integrates the most popular in the business development of open-source framework Struts, Hibernate and spring as the main structure system. Implementation of Struts framework focuses on the MVC model.
Acknowledgements
  


相关评论
广告联系QQ:45157718 点击这里给我发消息 电话:13516821613 杭州余杭东港路118号雷恩国际科技创新园  网站技术支持:黄菊华互联网工作室 浙ICP备06056032号