Spring Boot Based Online Shopping Web Application
CHAPTER 2 E-COMMERCE WEB APPLICATION
Download 1.69 Mb. Pdf ko'rish
|
WeiTianyu Project2022
- Bu sahifa navigatsiya:
- 2.2 Back-End
CHAPTER 2 E-COMMERCE WEB APPLICATION
2.1 SSM framework introduction Whenever we want to build an application like an E-commerce system, Spring framework can be used with many other frameworks such as Spring MVC, and MyBatis. The SSM integration framework: it is the integration of three open-sourcing frameworks, Spring MVC, Spring, MyBatis. It is also a typical MVC framework. It divides the whole system into four layers: presentation layer (JSP and related JS), control layer, service layer and database access layer. MyBatis: it is an excellent data persistence framework. It supports custom SQL, storing procedures, and advanced mapping. MyBatis framework has both the advantages of Hibernate and JDBC. Programmers can write SQL statements by themselves to facilitate optimization of SQL statements, while avoiding almost all JDBC codes and manually setting parameters and obtaining result sets [1]. The MyBatis functions can be shown in figure 6: Figure 6 MyBatis Function Diagram[6] Spring, Spring MVC, MyBatis can be combined together to make an efficient E-commerce application. The MyBatis framework with MVC design pattern can help in handling the data which is present in the system and help storing and requesting the data from the database. Spring MVC framework with Spring framework can help in handling the business logic and communication of end users and servers. The architecture based on integration of above frameworks can be shown as below: 5 Figure 7 Architecture of SSM framework 2.2 Back-End The priority of data processing depends on the complexity of data, and we usually deal with the simple data first and then work on the complexity ones. There is so much data in E-Commerce such as user data, product items, product categories, product items, watch list, shopping car, and order list. We need to design many functions based on a particular type of data. In the user module, there are many functions based on user data such as Register, Login, Update password, and so on. Each function should follow the following steps: ● Create database table ● Create entity class ● Persistence Layer (SQL statements) ● Interface and abstract methods (Reason: decoupling) ● Service layer ● Controller layer ● Front-end page 6 |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling