1. Unified interface development documents for both parties
In order to improve development efficiency and facilitate communication, it is necessary to establish standardized development documents.
General protection interface functions or pages, interface addresses, interface parameters, interface return values, etc. are described.
Reference document format:
2. Pay attention to the following
- versions and make plans for subsequent interface upgrades.
- Provide keys and tokens. Ensure data is not tampered with.
- Use get to read data and post to modify data.
- The interface return value format has a unified structure. Use JSON format output
- interface to record logs. Record request parameters, occupied memory, response time, and response duration. To facilitate subsequent optimization.
- Provide unified error codes. Each number represents an error that needs to be documented. Errors are divided into system errors and business logic errors. Create interface documentation.
- Record the purpose of each interface, parameter list, and return value description. Usage examples are also given.
').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i ').text(i));
};
$numbering.fadeIn(1700);
});
});
The above has introduced the precautions for developing APP interfaces with PHP, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.