Mobile mall project summary
The mobile mall project is my second big project. The project system comes from the Chuanzhi Java168 issue, a ten-day video course (the students who want the video can follow my official account and get it directly)
Through this project, I have broadened my horizons again. After practicing by myself, I put the code of the project in GitHub: github.com/ZhongFuChen… At the same time, I also recorded it in blog posts during the practice, a total of 7 articles.
- Mobile Mall Part 1 [Building Project Environment + Data Model]
- The second part of the mobile mall (brand management module) [file upload, data verification, CRUD]
- The third part of the mobile mall (product management) [inquire about products, add products]
- The fourth part of the mobile mall (commodity management) [add product sequel, product review and shelf removal, front-end display, back-end screening]
- The fifth part of the mobile mall (user module) [user login, echo user, interceptor, delivery address]
- The sixth part of the mobile mall [single product query, static page]
- Mobile Mall Chapter 7 [Add, delete, modify, check and submit orders in shopping carts]
Knowledge involved in this project:
- SpringMVC (upload pictures to the server, background verification, interceptor)
- Spring
- Mybatis (reverse engineering, dynamic SQL)
- JSP,FreeMarker
- JS Components (Rich Text Editor)
- Maven
- AJAX
- Oracle
- WebService
- object model design understanding
The purpose of writing this blog post is also to summarize what I have learned in this project. In addition to the above outlines of knowledge points, there are many practical tips :
- The project can be divided into background modules and front-end modules (there is no need to write them together). If the front-end module crashes, it will not affect the back-end module. It is necessary to build a resource server (CDN) to store static resources. In order to do one build , a parent module is used to manage them
Jersey
It is very convenient to upload pictures to the server by calling the API. The path of uploading the server may be used frequently. It can be written in the configuration file and used throughout the site.- It is necessary to do foreground and background verification . For a better user experience, foreground verification and background verification prevent malicious submissions.
- Both settings
readonly
anddisabled
attributes can make the foreground unable to be modified, andreadonly
can obtain specific values in the background, butdisabled
attributes cannot obtain values in the background - When there are too many types of data to be submitted on the front page (single-select box, multi-select box, drop-down box), since the data on our page is queried through SQL and then displayed on the page, then we can change the way of thinking: get their data id, judge its entry type (database field). Traverse the collection (data queried from the database), if the id is the same, it means it is selected on the page
- When using jquery to copy a style, the
name
attributes are the same. If data needs to be submitted in the style, you can add a variable to distinguish it. After copying, use regular expressions to remove unnecessary things. - It is a common practice to use AJAX to get whether the user is logged in (pure JS code)
- jQuery's
trigger
methods can programmatically respond to our events - Using static pages can reduce the access to the database, and the browsing speed will be greatly accelerated
- The problem of two machines calling services should be solved by thinking of WebService.
- Some user-level data (lightweight) can be considered for storage in cookies. Cookies store JSON values , which can be converted between JSON and Java objects through JsonArray
- If our data is passed or converted in the background, nothing has changed in the foreground. Then we can directly use the data in the background to operate on it
If you have weak SSM foundation, you can read my series of articles first:
Mybatis:
- Mybatis [Getting Started]
- Mybatis [configuration file]
- Mybatis [Association Mapping]
- Mybatis [cache, proxy, reverse engineering]
- Mybatis [integrated with Spring]
- Mybatis interview questions
Spring:
- Getting started with Spring is enough
- Spring [dependency injection] is so simple
- Spring [AOP module] is as simple as that
- Spring [DAO module] knowledge points
- Getting started with SpringMVC is so easy
- SpringMVC [Development Controller] Detailed Explanation
- SpringMVC [parameter binding, data echo, file upload]
- SpringMVC [validator, unified exception handling, RESTful, interceptor]
- SpringBoot is that simple
- SpringData JPA is that simple
SSM Integration and Reading Project:
- SSM [the most detailed integration in history]
- Java high concurrency spike system [summary after view]
- Read the scm of the SSM project
If there are any mistakes in the article, please correct me, and we can communicate with each other. Students who are accustomed to reading technical articles on WeChat and want to get more Java resources can follow WeChat public account: Java3y