Here we will record some experience in restructuring the e-commerce background system.
-- James Fu
- Unified management of public resources such as membership levels, order statuses, and Order Types
- Do not use Ajax too much. For example, do not initiate another Ajax request to load data after the page is loaded.
- Do not write a large number of JS files on the pageCodeAnd do not include services in JavaScript. Many things should be handled at the backend as much as possible, so that later modifications will be clear.
- Do not overencapsulate. In the just-completed reconstruction project, there are both web form applications and MVC applications. Web forms over-encapsulate server-side controls, resulting in poor performance and bringing new learning tasks to developers. The MVC application encapsulates a large number of JS tools, resulting in huge JS Code and difficulty in maintenance.
- The project defines multiple DTO, including viewobject, datacontract, entity, and objects which are converted back and forth using transformer. This is really painful. We recommend that you integrate datacontract and entity to ensure uniformity. Define viewobject on the front end and use it. For example:
- Public class soviewobject {public somsg model {Get; set;} Public String sotypedesc {get {return socommon. getsotypedesc (model. sotype );}}}
6. <unfinished>