Mobile Mall Project [Summary]

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.

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
  • JerseyIt 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 readonlyand disabledattributes can make the foreground unable to be modified, and readonlycan obtain specific values ​​in the background, but disabledattributes 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 nameattributes 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 triggermethods 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:

Spring:

SSM Integration and Reading 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

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325172849&siteId=291194637