Home > Web Front-end > JS Tutorial > New ideas for web page data display (json)_json

New ideas for web page data display (json)_json

WBOY
Release: 2016-05-16 18:25:25
Original
1189 people have browsed it

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)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template