On the complete separation of the front and rear ends of PHP

how can the PHP code be completely separated from the front-end code? I am a newcomer who just went to work. Recently, I have spent a lot of time operating the front-end code. I am very confused. I have come to ask for help from the big guys in the community. Thank you. Happy Dragon Boat Festival ~

.

if everyone in the company knows both front and back, there's nothing to share. If you are the only one in the company, there is nothing to share. If there is a serious differentiation between the two levels of skills, it is necessary to divide them.

the so-called front-end separation means that the back-end only provides json data, and all the front-end data is requested through api, and then the request format follows the rules of restful. Of course, the back end needs to provide interface documentation.

more cutting-edge, graphql learn about

generally speaking, there are advantages and disadvantages, and the workload of front and rear separation naturally increases, but it will be more beneficial for employees who are more vertical in the skill tree. It is faster not to separate the pre-development, and the task of one person and one large module is directly taken away, but it is also painful to maintain, and it is not easy to expand

.
Menu