How to interface data more elegantly in complex business scenarios

  1. currently encounters a complex data interface, and a large object will be sent to the front end. Large objects contain the key of N, and the data of each key is different, strings, objects, numbers, arrays, etc. How to deal with this interface data docking more elegantly? I feel that the current processing is a little messy, and the code has been changed to death after a slight change to the data interface.

for example, the interface of grafana has so much data. How to deal with it more elegantly.
clipboard.png

May.25,2022

refer to Restful design style, separate resources
for example, user list returns user basic information
user's city, user's work history is obtained separately in more user id or resume id, and the front end controls


consult with the background, a large parameter transfer string is put into a separate field.
only key information is sent.
for example:

params = {
    userId:xxx,
    jsonStr:json
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9c4f1-18c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9c4f1-18c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?