Separate HTML or not (front-end) of back-end cannot be considered good or bad practice in a universal way, it depends on the scope of your project, the type of professionals you have at your disposal, how much you are willing to invest, among other things. And like all development methodologies, there are advantages and disadvantages:
Main advantages:
- Independence between client and server;
- Use of different resources;
- Focus restricted to each area
Independence between client and server:
Separating client and server layers so that they communicate only via API (REST, for example) you create total independence and prevent rework if your back-end needs some kind of change.
For example: You created a project in the X language, but the project scaled to such an extent that you now need to transcribe much of it into the Y language to get more performance. This often leads to the loss of the template system you used, but with the server-independent client, you would have it the same way and would only have to take care to expose and maintain the same Apis in the new language.
Use of different resources:
As much as people still underestimate the UI and UX part of a project, it becomes increasingly evident that this is one of the most important parts in the scope of a project. But the problem is that most professionals working with UI and UX are not back-end programmers, and vice versa.
That is, if you use a template system of your own language, or generate the screens in your code, you can hardly get anyone to create screens thinking about the principles of usability and final experience. Now, emancipating the front-end and leaving its development to specialized professionals, this is no longer a problem since the Front-end Designers and Developers market has experience (among others) precisely in the HTML, CSS and Javascript languages.
Focus restricted to each area:
Following the above advantage, this topic represents the fact of having different professionals for different tasks. Just as you don’t put the engineer to decorate the living room of a building, you shouldn’t put a back-end programmer (who takes care of the logic of the system) to create screens, visual and logic on the front end of a system. Separating the areas (back-end and front-end) you can leave each side more free to work centered in your area, without mixing the sides and tasks of each professional.
Main disadvantages:
- High cost;
- More complex management;
- Quality risk.
High cost:
His project, which had a development team, will now have another arm focused on the front-end side. On the one hand this would open up the back-end programmers a little, but on the other, it would have the additional cost of new developers, a new team and an eventual manager for the new area (see next topic);
More complex management:
As stated above, one more "sector" may lead to the need for another manager focused only on the front-end team. The project would now have two fronts that would walk independently, but at the same time having the need to have synchronization for harmonious communication between the client and server sides.
Quality risk:
This problem can occur both in the back end and in the front end, but if it is not done a good level monitoring and management, or if the hired professional is not in fact of quality, it is possible that you have a front-endmessy end and difficult maintenance and scalability, which would bring you more losses (of time and money) than advantages.
As said there at the beginning, whether or not to separate the front end depends a lot on the context in which your project is. And you should take into account that cost and management can be heavier initially, but if done with planning, they can have good long-term results.