当前位置:网站首页>Design and implementation of online shopping system based on Web (attached: source code paper SQL file)
Design and implementation of online shopping system based on Web (attached: source code paper SQL file)
2022-07-06 09:21:00 【Procedural mushroom cool】
pick want
With the rapid development of computer network technology and the accelerating pace of people's life , E-commerce technology has been gradually integrated into people's daily life , As the most common form of e-commerce, online shopping mall , It has been gradually accepted by the public . Therefore, develop an online shopping mall system , Suitable for today's situation , It is more convenient for people to shop online .
This online mall system is based on MVC Layered thinking is the principle , Use SSH Framework for integrated development . Page display uses JSP and HTML, Database usage MySQL, These technologies are relatively mature at present , Convenient for system maintenance and expansion . The front desk of the online mall system includes user registration 、 The user login 、 Product search 、 Add item to cart 、 Delete products and other functions ; The background management function includes the modification of commodities 、 add to 、 Delete 、 Main functions such as user management and order management . This system has simple operation 、 Page friendly 、 Flexibility 、 Stable operation, etc .
Use with others ASP,PHP Compared with the online shopping mall system written in , The system uses JSP Language is more convenient and fast , Development is more efficient . Use SSH The framework and JSP A combination of ways , The coupling degree of the system is greatly reduced , The maintainability of the system is enhanced 、 Portability . This system uses database connection pool technology , Effectively prevent the occurrence of system crash caused by too many connections , And based on Annotation Development by annotation , Make the data access of online mall system faster .
key word : Online shopping ;MVC;SSH;MySQL
Design and Implementation of Web - based Online Shopping System
Abstract
With rapid development of computer network technology and theaccelerating of people lives rhythm,the electronic commerce technology has been gradually into people's daily life, as the most common form of the e-commerce,online shopping is easy to accept by public. Therefore to develop an online store system for today's situation,and more convenient for people to shop online.
This system of online shopping to MVC hierarchical thought principle,using the SSH framework for integrated development.The front display using JSP and HTML page, background database using MySQL,the technology is relatively mature,the system is convenient to maintenance and expansion.Online shopping mall in front of the system including the user registration,user login,commodity information,add commodity to cart, delete commodities,user messages and other major function;the backstage management function includes commodity modification,add,delete,user management,order management and other functions.;The backstage management function includes commodity modification, add,delete,user management,order management and other functions.This system has the advantages of simple operation,friendly interface,good flexibility,the characteristics of stable operation.
Compared with other online shop to use ASP, PHP language system, the system uses the JSP language more convenient, develop more efficiency.SSH framework and JSP combination of greatly reduced the degree of coupling of the system,and enhance the system's maintainability,portability.This system uses a database connection pool technique is effective to prevent the occurrence of the number of connections is too large to cause a system crash situation, and use the Annotation annotation-based development, online store system data access is fast.
Key words:Online Store; MVC; SSH; MySQL
The introduction
System development background
With the increasing influence of network on people's life and work , People are increasingly dependent on the Internet , Whether it's individuals or businesses , Commodity information exchange and trading circulation can be carried out through network channels . Online shopping malls have emerged , Slowly came into people's sight , More and more businesses have built online shopping malls , Provide consumers with a new way of shopping . The emergence of online shopping malls , Make the process of online shopping simple 、 convenient 、 quick . Online mall is a business information system with interactive function , It builds a virtual shopping mall on the Internet , Make shopping fast and easy , Therefore, online shopping malls have developed very rapidly in recent years , Online shopping malls will also have an increasing impact on people's lives .
Undeniable? , Online shopping mall will be an indispensable part of enterprise development and personal life , Moreover, shopping in online shopping malls will become the most important consumption mode acceptable to the masses .
Development significance
From the development background of the system , Developing an online shopping mall system will have the following advantages :
(1) Less investment , Recycle quickly . A survey of small and medium-sized enterprises in China shows , Individuals need a lot of money to start selling companies offline , The cost of online shopping mall is very small . The investment cost of setting up a store online is very small , Don't rent a store , Don't hoard goods , Not much money is needed . Online shopping malls are better than facade shops of the same size “ The rent ” Much lower , At the same time, the rent will not increase due to the increase of business area , Businesses don't have to pay extra for extending business hours .
(2) There is basically no need to occupy funds . The purchase funds of traditional stores are as little as several thousand yuan , More than tens of thousands of yuan , Online shopping malls do not need to overstock too much capital .
(3) 24 Hours open . The online mall has extended the business hours of traditional stores , One day 24 Hours 、 A year 365 Business does not stop for days , And it doesn't need many special personnel on duty .
(4) Not limited by store space . Even if it's just a small shop on the street , On the Internet, you can have a store as big as a department store , As long as investors are willing , Thousands of goods can be placed .
(5) Not affected by geography . No matter how far the customer is from the online mall , Whether the customers are domestic or foreign , As long as customers can access the Internet , You can easily find and buy goods in the online mall .
Current situation at home and abroad
In the U.S. 、 Europe and other countries with a high degree of informatization , Online shopping malls are developing rapidly , World class retailers , Like Wal Mart 、 Macy's 、 Home Depot and sax have entered the ranks of online sales . And in American families , People have become more and more accustomed to online shopping . Online shopping has become an American 、 The British 、 A consumption habit in developed countries such as Japan .
In our country , It's only more than ten years since online shopping started from scratch . In recent years , Online shopping has become hot , Online shopping has quickly become a shopping fashion . At present, large online shopping malls in China, such as Taobao 、 JD.COM 、 Vip.com, etc. , The development is very rapid , With the development of domestic computer information technology , Online shopping will develop more rapidly , Provide consumers and businesses with a broader sales platform . therefore , Developing an online shopping mall system is very in line with the development trend of today's society .
The content of this system design
This design mainly analyzes the current development situation of online shopping mall , Introduce the development tools , Analyze the feasibility of the system 、 System requirements analysis , Then the overall design of the system , Design the relationship and structure of tables in the database , Finally, complete the overall implementation of the system , And test the system , So as to complete the whole system .
Design steps
Chapter one : The introduction , It mainly introduces the development background of the system 、 Research significance 、 The current situation at home and abroad and the content of the design .
Chapter two : Development technology , It mainly introduces the technology and tools used in the development system .
The third chapter : Systems analysis , It mainly includes the feasibility analysis of the system , System requirements analysis .
Chapter four : The system design , Mainly for system function modules 、 Workflow and module design are introduced .
The fifth chapter : Database design , It mainly introduces the data table information required by the system and the relationship between tables .
Chapter six : system implementation , It mainly introduces the implementation of each module and the key code .
Chapter vii. : The system test , Pressure test the system , Get test results .
System development technology
Dynamic web page technology JSP
JSP(Java Server Pages) By Sun Microsystems company ( Has been Oracle Acquisition ) advocate 、 A dynamic web technology standard established by many companies . It's on traditional web pages HTML File insert Java Program segments and JSP Mark , Thus forming JSP file .JSP Technology has the following advantages over other technologies :
(1) Write only once , You can run in any other environment . Besides the system , The code doesn't need to be changed .
(2) The system has multi platform support .JSP Technology can be developed on many platforms , Deploy and expand the system in any environment .
(3) Powerful development tool support . It has been supported by many excellent development tools JSP, Many of them are free , And many tools can run smoothly on many platforms .
22 frame SSH
SSH yes Struts+Hibernate+Spring Integration framework for ,SSH The characteristics of the framework are as follows :
(1) Struts Reduce the coupling degree of the system , Make the logical structure of the system clearer .
(2) Hibernate Is an open source object relationship mapping framework , It's right JDBC Lightweight object encapsulation , Make it more convenient for the system to manipulate the database .
(3) Spring In the framework IOC and AOP Decouple the system to the greatest extent , Reduce the coupling between the layers of the system , It greatly improves the efficiency of system development .
The system is integrated SSH Framework of the , Its levels are : The presentation layer 、 Business logic layer and data persistence layer . Presentation layer adopts JSP,Struts As the overall infrastructure of the system ,SSH The relationship of each level of the framework is shown in the figure 2-1 Shown .
System development tools
The main development tools of the system are as follows :
(1) MyEclipse: It is a very excellent one for development Java Of Eclipse Plug in collection , It's full of functions , And fully support JSP、HTML、Struts、Spring、CSS、JS、SQL 、Hibernate, its 9.0 The version already supports JavaEE6, So choose MyEclipse9.0 It is very suitable for development .
(2) Tomcat: It is a small system resource with runtime , Good scalability , Lightweight application server that supports functional advantages such as load balancing . its 7.0 Version implements the JSP2.2 Support for , And increased Web Apply memory overflow detection and prevention functions , So choose Tomcat7.0 As a system server .
(3) MySQL: It is a relational database management system , Save data to different tables , Improved access speed and flexibility .MySQL The database is fast 、 Small volume 、 Good migration performance , And it's open source , choose MySQL Database is of great benefit to all aspects of the system .MySQL5.7 The version has been improved MySQL Performance of 、 Usability 、 Extensibility , So choose MySQL5.7 Carry out systematic database management .
System configuration process
Detailed process of system configuration :
(1) stay MyEclipse Configured and installed Java Development package and Tomcat The server ;
(2) install MySQL5.7, Set account password , For database connection , Then install Navicat for MySQL, So that the database can be operated under the graphic page ;
(3) stay MyEclipse New China Web Project project , The project is called webShopping;
(4) Import Struts2 package ,Spring package ,Hibernate package , among Struts2 The configuration file is Struts.xml,Spring The configuration file is bean.xml, Use bean.xml File to configure the database connection pool ;
(5) Import external MySQL Drive pack , For database connection .
Data flow diagram
Data flow diagram is a graphic tool to describe the data flow in the system . In this system , Users who are not logged in submit registration information 、 Submit login information , You can buy goods after logging in 、 place order 、 Modify personal information . The administrator can check the product information 、 Order information 、 Manage user information . This involves the information processing of various databases . Analyze the system , You can get the following data flow diagrams :
The top-level data flow diagram of the online mall system is shown in the figure
The data flow diagram of the first floor of the online mall system is shown in the figure
User information management data flow diagram is shown in Figure
The commodity management data flow diagram is shown in the figure
The system design
The function module design of the system
The online mall system is managed by the front desk 、 Background management consists of two parts .
Front desk management : This part mainly refers to the functions such as product query , Without registration, users can query commodities and view commodity information ; After the user registers, he can add goods to the shopping cart 、 Delete item from cart 、 Order submission 、 Personal information update and other operations .
Background management : This part mainly manages some basic data in the mall effectively , Including commodity management 、 Member management 、 Order management, etc .
(1) The front desk system framework of the online mall system is shown in Figure
Introduction to the main functions of the front desk :
① Search for products : Users can enter the name of the product to view the product to be queried without logging in , And you can view the details of the product , Such as manufacturer 、 The remaining quantity 、 Introduction, etc .
② Search by category : Users can view the products of this category by category .
③ User registration : Users can enter registration information to register , The user can check whether the user name exists , If there is no error in the user registration information, you can register correctly ( Do not use Chinese name to register ).
④ The user login : The user enters the login name and password to log in , If the user name and password are incorrect, you cannot log in .
⑤ Update the information : After logging in, users can view their personal information and update their personal information , You can also change the password .
⑧ The shopping cart : After the user logs in, he can shop , You can add items to the shopping cart , Or delete the item from the shopping cart , If the quantity of goods is 0 Cannot be added to the shopping cart .
⑨ place order : The user can submit the order after adding the product to the shopping cart , After the order is submitted, the user can make payment ( The system simulates an account for the user , For user shopping , If the user account balance is insufficient, payment cannot be made ).
⑩ Check the order : Users can view their orders .
(2) The background system framework of the online mall system is shown in the figure
Introduction to the main functions of the background :
① Commodity category management : After logging into the background, you can add commodity categories 、 Delete . When adding, if the product category already exists, an error will be prompted .
② Commodity management : The administrator adds commodities 、 Delete operation , If the goods already exist , When adding, you will be prompted that the product already exists .
③ Order management : Administrators can query orders , View all order information .
④ User management : Administrators can query user information , Manage user information .
⑥ System management : The administrator can change the login password , Safety exit .
The workflow of the system
(1) The workflow of the front desk of the online mall system is shown in the figure
The workflow of the background of the online mall system is shown in the figure
Database design
Database conceptual design
The conceptual design of database is based on the analysis of the system 、 The system design , Plan out the database entities used in the system . The main tools for describing conceptual models are E-R chart . According to the analysis of this system , Plan out the entities required by the system , Specific have : user 、 goods 、 Commodity category 、 Administrators 、 Order .
Definition of entity attributes
(1) The attributes owned by user entities include users ID、 user name 、 User password 、 Gender 、 full name 、 Telephone 、 The eight attributes of mailing address and email address . User entity attributes are shown in the figure
(2) The attributes owned by commodity entities are commodities ID、 Name of commodity 、 Commodity category 、 Commodity images 、 Commodity Description 、 Commodity manufacturer 、 Mall price 、 The original price of the goods 、 Total quantity and remaining quantity . The commodity entity attributes are shown in the figure
The attributes of commodity category entity include commodity category and commodity category name . The entity attribute of commodity category is shown in the figure
The attributes of the order entity include order ID、 Order user name 、 goods 、 Submission time 、 Delivery time 、 Total sum 、 The eight attributes of whether to ship goods and whether to pay . The order entity attributes are shown in the figure
system implementation
System main page
The system mainly uses light tones , The color won't be dazzling , Will not make the customer feel disgusted . The system page is simple , The navigation above includes user login 、 User registration 、 Message board and other information , A list of product categories is displayed below 、 Listing goods 、 Mall announcement 、 User login box and other information , Users can query each kind of goods through the left navigation bar , You can also search for products . The main page of the system is shown in the figure
User registration
Users can become mall members by registering , Click user registration to open the user registration page , User registration includes user name 、 password 、 User name 、 Gender 、 Telephone 、 Shipping address 、 Email and other information , When users click each input box, they will be prompted with the content to be filled or precautions . The user registration page is shown in the figure
The user login
Users can log in through the login box on the right , You can also log in by opening the user login page through the navigation bar above . The user login page is shown in the figure
If the username and password are correct , You will be prompted that the login is successful , Jump to home . If the user name and password are incorrect , Will prompt login failure , Go back to the login page , The user needs to log in again . After logging in, users can view the goods in the shopping cart 、 Submit message 、 Check your order, etc . Users can click the exit button to exit the system . After the user logs in successfully, the page is shown in the figure
Retrieve password
If the user has already registered , But the password is incorrect or forgotten , You can reset the password by entering the correct registration information . The page of inputting and retrieving password information is shown in the figure
View product information
Click the detailed button under the product , You can view the details of products , You can see the name of the product in the details of the product 、 Product id 、 Commodity manufacturers 、 Price 、 Number 、 Listing time and product description , This operation can be carried out without logging in . The product information page is shown in the figure
Search for products
Users can search products by entering some keywords of products , After searching for products, the information found will be displayed , If there is no relevant information, the information of unchanged products will be output . The search product information result page is shown in the figure
Login user operation
The shopping cart
Users can only add products to the shopping cart after logging in . There is an add to cart button at the bottom of each item , Click Add to add to the shopping cart , Add an item , The remaining quantity of goods will be reduced 1, If the remaining quantity of goods is 0, Cannot be added to the shopping cart , Prompt that the goods are not available . In the shopping cart, you can view the items in the shopping cart , Simple information of goods . Items can be removed from the shopping cart , When removing items , The remaining quantity of goods will increase 1. Users can enter notes in the buyer's notes , Then click submit order to submit the order , You can also click continue shopping to continue browsing products . The shopping cart page is shown in the figure
payment
After the user clicks the submit order button , The user's order is submitted to the database , Then you can make payment . The user's amount will be checked when paying , If the user's amount is insufficient , It will prompt that the balance is insufficient to pay ; Only when the user's balance is sufficient can the payment be successful . If the user does not pay for the order , Merchants will not deliver . The user payment page is shown in the figure
Update personal information
Users can modify their personal information after logging in , When modifying personal information, you need to enter the correct information , Click Update personal information to update personal information , But the updated information will not be displayed until the user logs in again . The user can also change the login password . The user updates the personal information page as shown in the figure
Background management
Backstage login
You can open the login page of background management through the link at the bottom of the main page , You need to enter the administrator account and password on the background login page , If the user name and password are wrong, you cannot log in , Only by entering the correct administrator account and password can you log in to the background main page . The background login page is shown in the figure
Background main page
Enter the correct administrator account and password , Open the key homepage in the background , The homepage mainly displays the introduction of this online mall development tool , There are shortcut functions on the left , There is a list above to select each operation . Click exit to exit the background management page and return to the login page . The background homepage is shown in the figure
New product categories
New product categories , Fill in the product category name , Submit to add a new product category . The new product category page is shown in the figure
List of product categories
Administrators can view the list of product categories . The product category list page is shown in the figure
New products
You can fill in the name of the new product 、 Product id 、 Choose the product category 、 Fill in the manufacturer 、 To upload pictures 、 Add product description 、 The original price of the goods 、 The selling price of the mall 、 The total quantity of goods . The new product page is shown in the figure
List of goods
Administrators can view the list of products . The product list page is shown in the figure
Order list
Administrators can view the order list , The contents displayed include : The order no. 、 Whether the user has paid 、 Has it been shipped 、 Total sum 、 You can perform order shipment operations . The order list page is shown in the figure
Order condition query
Enter the conditions of the order to query the order , Used by administrators to query qualified order information . The order condition query page is shown in the figure
User list
The user list includes the information of all users , The contents displayed are : User name 、 contact number 、 address 、 Mailing address 、 Delete users, etc . The user list page is shown in the figure
Open source projects and data sharing : Get the source code of the system for free Courseware and other materials : It only needs : give the thumbs-up + Focus on + Direct messages I ~
If Xiaobai wants to get started Java,Python Of , But I don't know what to learn How to learn ? Sure Direct messages I , Selfless sharing Java and Python Net of Pan Information ~~~
Share with each other Let me share with you ~~~
We can also share what resources we have , If you have any questions, you can also discuss with each other ~~~
Click ~~~ You are a One of me Then we have to learn the wind and water ~~~( dog's head )
边栏推荐
- Pytest's collection use case rules and running specified use cases
- [OC foundation framework] - string and date and time >
- Servlet learning diary 8 - servlet life cycle and thread safety
- xargs命令的基本用法
- Kratos战神微服务框架(二)
- Show slave status \ read in G_ Master_ Log_ POS and relay_ Log_ The (size) relationship of POS
- Global and Chinese market of airport kiosks 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese market of metallized flexible packaging 2022-2028: Research Report on technology, participants, trends, market size and share
- Advance Computer Network Review(1)——FatTree
- 五层网络体系结构
猜你喜欢
[OC]-<UI入门>--常用控件-UIButton
Once you change the test steps, write all the code. Why not try yaml to realize data-driven?
Redis cluster
Withdrawal of wechat applet (enterprise payment to change)
[oc foundation framework] - < copy object copy >
Redis geospatial
Redis之主从复制
QDialog
不同的数据驱动代码执行相同的测试场景
Le modèle sentinelle de redis
随机推荐
LeetCode:214. Shortest palindrome string
Kratos战神微服务框架(三)
Global and Chinese market of capacitive displacement sensors 2022-2028: Research Report on technology, participants, trends, market size and share
The five basic data structures of redis are in-depth and application scenarios
Withdrawal of wechat applet (enterprise payment to change)
Improved deep embedded clustering with local structure preservation (Idec)
QML control type: Popup
Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)
Selenium+Pytest自动化测试框架实战
Global and Chinese market of cup masks 2022-2028: Research Report on technology, participants, trends, market size and share
Chapter 1 :Application of Artificial intelligence in Drug Design:Opportunity and Challenges
Intel Distiller工具包-量化实现2
什么是MySQL?MySql的学习之路是怎样的
Redis之Geospatial
[OC-Foundation框架]---【集合数组】
QML type: locale, date
Once you change the test steps, write all the code. Why not try yaml to realize data-driven?
Leetcode problem solving 2.1.1
[OC-Foundation框架]-<字符串And日期与时间>
[three storage methods of graph] just use adjacency matrix to go out