I have a question that has not yet been clarified, in the development with php, the ideal is to separate the backend from the frontend, using Rest and consequently web services, or in the traditional way, running everything on the server?
I have a question that has not yet been clarified, in the development with php, the ideal is to separate the backend from the frontend, using Rest and consequently web services, or in the traditional way, running everything on the server?
There is no right way.
While there are many reasons to separate the back end from the front end on many projects, there are specific situations (which I have already seen) that implementing a new layout on the catch pages have been wasted resources. You have to know exactly what your project needs. If your project is a platform, or application, and has institutional pages, you can do the separation of the layout application, since the previous one is pages of captures.
If your project, the layout is part of the business plans, you can create all the modules separately (search for MVC architecture), even though they are part of the same system, such as frameworks and CMSs. However, if you use some framework, customizing code that was not written by you can take time, and you have to see if it's worth it, often better not to waste time messing around.
If you are building your system from scratch, you are free to study a bit of OOP, and create scalable interfaces, with a good use of MVC-oriented code.
There is no right or wrong answer to this question.
In my opinion ...
Separating you win:
Separating you lose:
The most modern frameworks, example Angular2 , use the separation, the frontend being TypeScript (a simplified way to write the JavaScript ) and the backend in Node.Js .