Home Backend Development PHP Tutorial Please tell me about the APP backend multi-version strategy

Please tell me about the APP backend multi-version strategy

Sep 13, 2016 am 08:46 AM
php

Someone has asked this question before, but I saw that there are no nutrients that can be absorbed, so I want to ask again, how do everyone do it?
Because the project needs to control the situation where multiple versions of interfaces are provided to multiple versions of clients at the same time, I have always had questions about the interface version strategy. Please tell me how you achieved it?
Back-end language: php
The implementation methods I can think of at present:
1. Single directory, internal judgment of the interface (very disgusting, easy to cause confusion)
2. Drag out a version directory for each version, and you can modify it as you like A version of the interface, but if there is an interface logic that needs to be modified, it may involve files in all versions, such as 1.0, 2.0, 3.0, 4.0. . . A very abnormal way
3. Create a basic version and use the rules of autoload. If there is one in the version directory, use the class in the version directory. If not, use the class in the basic version. The advantage is that only changed files exist in each version directory. But during development, it still feels laggy.
4. Using inheritance, the classes in the version override the class methods in the basic version. The advantage is that only one method needs to be rewritten, but the disadvantage is that the problem of private methods is taken into consideration.

I hope there are other ways to better manage multiple version issues.
Thank you

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

CakePHP Date and Time

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

CakePHP Project Configuration

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

CakePHP File upload

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

CakePHP Routing

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

Discuss CakePHP

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP Quick Guide

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

How To Set Up Visual Studio Code (VS Code) for PHP Development

See all articles