On the client side, js is used to bind json data to page elements, while on the server side, only json strings with different data are generated based on parameters. This not only reduces network data traffic, but also separates the display layer and logic layer.
In order to bind data, the client must have the js code used to bind data. Data binding is generally the same, so you can use a common binding method, such as span to bind data to html attributes.
Advantages:
1. The amount of data exchange is small, which is beneficial to transmission.
2. Separation of page and business layer
3. Data binding without refresh
4. Since the amount of data to be generated is reduced on the server side, the pressure will be reduced
Disadvantages:
1. Due to the use of js to bind data, the pressure on the client increases
2. Different browsers cause the js code to be inconsistent Compatible, there may be a data binding failure problem (serious) (this flaw can be made up for by adding user-expandable binding methods)
3. The surface structure of the website is easily exposed to intentional people (need to do Safety work may need to be increased)