Design and implementation of B/S-based online snack sales system (attached: source code paper Sql file)

Summary:

This article introduces the entire development process of the online snack sales system, adopts the domestically recognized B2C mall station building system model, and designs and develops an online trading platform according to the current status of the existing shopping system.

This article mainly expounds the completion process of the whole system, simulating a network transaction system with sellers, buyers and administrators. However, this platform divides different users in detail. Functionally enriched and optimized each module. The interaction between these modules is used to complete the transaction process of the entire item, providing consumers and merchants with a convenient and fast business experience. The description has simply quoted the history and current situation of e-commerce, and also introduced the functions that the system needs to complete, and made a detailed plan for the completion process and time of the entire project. Finally, some brief introductions are made to the foreground application software of the online snack sales system.

The online snack sales system uses JSP as the main web development technology. Using B/S three-tier architecture as the basic framework for development, out of the consideration of system maintainability, coupling and security, JavaBean is used to encapsulate the key parts of the project. The database adopts the MYSQL5.0 database which is very convenient for post-maintenance, and its visual tools can quickly and accurately modify the fields.

Keywords:  JSP; B/S three-tier architecture; JavaBean; MYSQL5.0   

The design and implementation of online snack sales system

Abstract

This article describes the online snack sales system throughout the development process, the use of domestic B2C mall to build the system model, and in accordance with the existing shopping system, the current design and development of network trading platform.

This paper focuses on the completion of the whole system, simulates a network transaction system with sellers, buyers and administrators. But this platform carries on the detailed division to the different user. The modules are enriched and optimized in function. Use the interaction between these modules to complete the transaction process of the whole article, providing consumers and businesses with convenient and quick business experience. The manual has briefly quoted the history and current situation of e-commerce, and also introduced the functions that the system needs to complete. It also gives a detailed plan for the completion process and the time of the whole project. Finally, the online snack sales system of the front application software are briefly introduced.

Online snack sales system to JSP as the main web development technology. The B/S three tier architecture is used as the basic framework of the development, and the encapsulation of the key parts of the system is processed by using JavaBean for consideration of system maintainability, coupling and security. The database adopts the MYSQL5.0 database which is convenient for later maintenance, Its own visual tools allow for rapid and accurate changes to the field.

    Key Words:JSP;B/S structure;JavaBean;MYSQL5.0

 Introduction

At present, the number of Internet users in my country has reached 731 million. With the popularity of Internet shopping and Internet payment, human economic activities have entered a new era. The functions of online consumer platforms such as Taobao and JD.com are becoming more and more perfect, so that people can get what they want without leaving home. Today's Internet has become an irreplaceable part of our lives. More and more people feel the convenience and happiness brought by the Internet, and more and more people like to enrich their lives through Internet shopping. Today's shopping is no longer the single existence of going to a physical store to select products, but in a virtual trading platform, the entire shopping process can be realized in just a few simple steps.

JSP is a dynamic webpage-based development technology. It has good compatibility and can import Java codes into HTML webpages by referring to the tags in JSP. Compared with the CGI program, JSP is faster in terms of performance, and the server side has strong compatibility and other advantages. With the improvement of Internet technology day by day, JSP technology is becoming more and more important in network programming. Therefore, I adopted JSP as the primary development tool for my graduation project, and built a shopping website that can realize simple Internet transactions-online snack sales system. This system can meet the functions of tourist registration and user login; it can satisfy users' inquiries about product categories, placing orders for products, viewing order information and other functions. Basically, a simple transaction process can be completed, and through the compilation of the database and the compilation and improvement of the code, the technologies required for a transaction system are basically reflected. Generally speaking, the current large-scale transaction websites are basically It is perfected and expanded on the basis of my system.

In this graduation project, I preliminarily determined the requirements of the entire project through the investigation of the operating principles of relevant e-commerce websites, and learned about the most popular dynamic webpage technology JSP at present, and conducted in-depth study of its related knowledge and technologies , the actual operation makes the prototype that originally only existed in the concept come true. In the later period, the repair of bugs and the beautification of the page have exercised my assiduous and cautious attitude, which will be a fortune for future work and study.

 development background

Today, with the development of the times, the emergence of VR technology enables people to carry out activities in the virtual space, while AR enables the simulation of what you want to see in reality. If these are connected with e-commerce, a new era will come. If you want to get these virtual things without leaving home, shopping websites have become the most popular choice nowadays, with a complete shopping system and various payment methods , Open the shopping website while experiencing virtual items, and turn it into reality, and things from all over the world will be delivered to us in a short time, and all of these benefit from the rapid development of logistics. It is under this general trend that I took "Online Snack Sales System" as my graduation project.

Status quo at home and abroad

Electronic Commerce: Conceptually, it refers to the transaction behaviors that occur between information network companies, between e-commerce and consumers, and between individuals through the Internet. Due to the early start of network development in foreign countries, the network environment in foreign countries is relatively complete and fully functional.

After entering the 21st century, through Internet technology, computer technology and long-distance interactive technology, the original complicated transaction process is completely electronic and humanized. The mainstream information system is a management system designed and implemented based on the B\S architecture [1]. In today's economic globalization, consumers at home and abroad only need to simply select and pay for commodities in front of computers or mobile phones, and they can get things far away from home without leaving home. The convenience brought by the Internet has begun to affect daily life. The original paper-based transaction method has been realized to the emerging transaction method of "Internet +".

It can be seen that, no matter at home or abroad, if you want to establish a complete e-commerce system, you need to analyze and process a large amount of information, and you must also master the theory and practical operation capabilities of database systems during the construction process. For the online trading platform that has become indispensable today, it is even more important for the realization of the system.  

instructions

The online snack sales system is developed and perfected on the basis of JSP. It can provide an online interactive platform for both sellers and buyers. After repeated optimization, it has been in line with the current popular shopping interaction methods in our country. Sellers can register on the platform, put new products on the shelves, discount products, update store information and other functions; buyers can realize simple registration, query product keywords, add products to the shopping cart, order payment and other functions on the platform; The website maintenance personnel can improve and maintain the mall by improving and deleting the information of each module of the mall, and improving and deleting the information of members.

overall design

Functional Analysis

After investigating the current large-scale e-commerce websites and roughly dividing the functions of the system, the online snack sales system will be divided into two management modules. The front-end module covers functions such as item category query, item information viewing, item ordering, shopping cart, and personal information modification. The background module covers the deletion and modification of news on the platform, the maintenance of items in the mall, the maintenance of transaction orders and the maintenance of registered personnel and other modules.

The specific description of the front desk is as follows:

1. Browse products

(1) Product details

(2) Product number

2. Order goods

3. Shopping cart

4. User information maintenance

(1) User registration

(2) User login

(3) User profile modification

The background management is described in detail as follows:

1. News management

(1) Add news

(2) Modify news

(3) Delete news

2. Commodity management

(1) Add product category

(2) Modify the product category

(3) Delete product category

(4) Add product information

(5) Modify product information

(6) Delete product information

(7) View product information

3. Order management

(1) Processing orders

(2) Handle delivery

(3) Checkout

(4) Delete order

  4. Friendship connection

(1) Add friendship links

(2) Delete friendship link

(3) Modify friendship links

5. Member management function

(1) Registered user

(2) Modify user information

(3) Delete user information

6. System user management function

(1) Add system user

(2) Modify system user information

(3) Delete system user information

    It can be seen that the system requirements will obtain 6 perfect functions.

The following is the relationship diagram between the two management modules, as shown in Figure 3.1:

 Schematic diagram of system function modules

After repeated design, I need an initial administrator before the system is started, so I added an initial administrator named "Admin" to the database to facilitate future maintenance. He can modify the registered members of the website and adjustments, and new system maintainers can also be added.

The following is a schematic diagram of the user management function module, as shown in Figure 3.2:

  User management function module relationship diagram

System Process Analysis

The system is divided into the following two processes:

The following is the user transaction flow chart, as shown in the figure

 Customer shopping process at the front desk

 Background transaction order management flow chart

data flow diagram

    The following is the data flow diagram during registration, as shown in the figure

System structure analysis

 logical structure

This system uses the B/S three-tier structure as the basic framework for development, and displays it in the form of a web page on the network platform. Visitors can use the web page to realize real-time viewing of commodities, real-time purchases, real-time viewing of transaction orders and other functions. And this system can be used as the basis of major e-commerce websites, has a very large scalability, and can add more required functions through secondary processing by programmers.

The following is a schematic diagram of the working situation of the website, as shown in the figure:

 The following is a schematic diagram of the physical structure of the website, as shown in the figure

Database Design

4.1 Introduction to the data sheet

 The system database adopts MYSQL5.0 database, and its function is to store the data obtained in the website. I set the system database name as FOODEMARKET, including 9 tables. The following are the data tables in the database:

(1) messages (message form)

User Module Design Overview

System principle

This system uses the B/S three-tier architecture as the basic framework for development

The following is its principle diagram, as shown in the figure

 The main architecture of the online snack sales system includes:

1) Data server;

2) WEB server;

3) Background management platform;

4) Client.

Factors that affect application system design include:

1) Business processing method;

2) Data processing capacity and storage capacity;

3) Application function design;

4) Server design;

5) Storage design;

6) Safety design.

 Program flow diagram of the user module

The design of the user module, the program flow chart design of its main functions is shown in the figure

detailed design

front desk

With the increasing consumption level of our people and the rapid popularization of online consumption, shopping on shopping websites has become the most popular means of consumption nowadays. Not only that, new festivals have been born during the development of shopping websites, such as the Double Eleven Shopping Festival and the Double Twelve Shopping Festival. In the case of more funds, consumers are also favored. This win-win distribution method makes the two parties of the transaction closer.

The following is the front page of the online snack sales system, as shown in the figure

The functions of the home page cover modules such as visitor registration, user login, display of the latest activities, query of item keywords, display of the latest items, etc.

 Member Login

Tourists can only normally purchase items in the shopping platform after logging in as a user.

1. Login

The login is based on the fact that the original tourist has already registered as a member. The user only needs to click login and enter his "user ID" and "ID password" in the text box according to the prompts, and click submit to complete the login.

2. Registration

Registration is for tourists who have not filled in the information on this website. Only by filling in the information can they enjoy the complete consumption rights as shoppers on the platform. Visitors only need to click "Register" in the upper right corner of the interface, and they will jump to the registration page. Tourists only need to complete the information in the corresponding text box according to the prompts and click "Submit". If they receive the prompt of "Successful registration", the registration is completed.

 Member profile modification

If the user wants to modify the registration information after logging in, just click "Personal Information" and it will jump to the user information modification page. Here you can modify the information except the user ID, and you can complete it through the information prompted in the text box, and finally click "Submit" to complete the modification.

 buy goods

Logged-in users need to purchase products, and can choose the latest products displayed on the homepage, or users can click on the name of the product they like in the "Product List", "Discount Zone" and "Sales Ranking", and select "Join" in the upper right corner shopping cart", and then enter the user center to perform simple purchase and payment operations on the added products, and then wait for the sale

As a qualified shopping system, users may need to buy more than one of the same product when purchasing. At this time, we can modify the quantity when purchasing or modify it in the shopping cart.

 check order

Users only need to enter the membership page and click "View Order" to track all transaction order information.

 Transaction Record

Click "Transaction History" on the home page to view it.

Mall information

Click "Mall Information" on the home page to view it.

Backstage

Through http://localhost:8080/foodemarket/login.jsp, enter the background login interface shown in Figure 5.2 below:

Enter the user name: admin and password: 123 in the text boxes of "User Name" and "Password", and click "Submit Information" to jump to the background maintenance interface. In the mall management interface, there are five sections: transaction information, website information, basic information, system management and personal information.

The following is the background management page, as shown in the figure

Trading Information

Click "Order in Progress", and the real-time transaction status will appear on the interface, where you can complete the monitoring of the product.

website information

Click "Mall Introduction", "Mall Information", "Advertising Image", "Contact Us", "Mall Announcement", "Message Board" and "Friendly Links" to modify the information of these modules on the home page.

basic information

Here you can manage the information of buyers and buyer users. Click "Commodity Management" to perform the same operations as sellers on all items that are being sold in the mall. There is also management of product evaluation and attributes.

System Management

Here you can maintain administrator information and members. Click "Add Administrator" to fill in the information in the interface that appears to add a new administrator. And click "Administrator Maintenance" to see the existing administrator information in the mall.

Personal information

Here you can click "Basic Information Management" to modify the information of the current account except the ID, and click "Change Login Password" to change the password of the current account.

exit background

Click "Exit System" in the upper right corner, and you will be redirected to the home page of the online snack sales system.

After many times of testing and optimization, the system has completed the interaction of all the contents of the modules with the database, from as small as a number to as large as a picture to complete the integration of the entire system. If the current Taobao, JD.com and other large electronic shopping malls are already full-fledged eagles, then my system is a young eagle that has just hatched. As long as you are willing to take the time to perfect it and expand its content and functions, It can shorten the gap with them and become a more reliable shopping platform.

  Open source projects and data sharing: free source code courseware and other materials supporting the system : only need: like + follow private message me~

If there is a novice who wants to get started with Java and Python, but he doesn't know what to learn and how to learn? You can private message me and share the webpan information of Java and Python selflessly~~~

Share and encourage each other~~~

If you have any resources, you can share with each other, and if you have any questions, you can also discuss with each other~~~

Tsk~~~ You and me alone, then we can't learn from each other~~~ (dog head)

Guess you like

Origin blog.csdn.net/lxianshengde/article/details/125260409