Home  >  Article  >  Backend Development  >  thinkphp data storage and data transfer between pages

thinkphp data storage and data transfer between pages

WBOY
WBOYOriginal
2016-08-04 09:20:441201browse

In the mvc structure, when c transfers data to v and v transfers data to c, should json be used as much as possible? Also, does mysql generally store arrays in the form of json?

Reply content:

In the mvc structure, when c transfers data to v and v transfers data to c, should json be used as much as possible? Also, does mysql generally store arrays in the form of json?

Are you a front-end kid? The answer is none... The backend generally stores data in the most convenient way. When providing data to the outside world across languages, it will choose the common form of json.

There is no need to convert it into JSON data, just use get or post. When the background data is transferred to the front-end jS, it needs to be converted. Generally, JSON is not used

json is just a better data transmission format, at least not yet a better database storage format. Each language has complete support for the json format. The database is used for storage. It is ok to convert it to json when outputting.

As for c=>v in mvc, it depends on each language and framework

Although the latest version of mysql already supports json storage, what is the effect? ​​At least for now...

Statement:
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