For a mobile app API design example?
PHP as a service-side Android, Apple as a client, PHP API interface should be designed to solve the new and old version and Android and Apple version inconsistency, 2. How to design the interface to ensure the scalability and flexibility of the function
Can you give us a complete example or a way of thinking about it?
------to solve the idea----------------------
The request interface will pass the version number and source (iOS or Android), you can return different data according to these two parameters
------to solve the idea----------------------
The service side is divided into two parts.
References:
Quote: References:
The request interface will be the version number and source (iOS or Android), you can according to these two parameters to return different data
can be understood so that Andro and Apple interface to separate the same thing service side to divide two parts, increase the maintenance amount
------to solve the idea----------------------
I am a copy of the processing logic for iOS and Android most of them are the same, and different places are written separately
------to solve the idea----------------------
The inconsistency of the place is written separately, is not the if else. As for extensibility and flexibility, this does not know where to start, a few more changes.