Front-end rendering versus back-end rendering
Back end rendering: The back end is rendered using various techniques, and the result is a rendered page (rendered in the server)
Front-end rendering: most of the content of the web page displayed in the browser is executed by the FRONT-END JS code in the browser, and the final rendering of the web page
Front end separation
-
The back end only provides apis to return the data, and the front end gets the data through Ajax and renders it to the page through JavaScript
-
The back end is focused on data, and the front end is focused on interaction and visualization
-
On the mobile side, the back end doesn’t need any processing, just use the same set of apis
Front-end routes and back-end routes
The heart of front-end routing: Change the URL, but do not refresh the page as a whole
Back-end routing: The back-end handles the mapping between urls and pages (well rendered pages on the back end are good for SEO optimization)
Disadvantages of back-end routing
- In one case, modules for the entire page are written and maintained by back-end people
- On the other hand, a front-end developer who wants to develop a page needs to write the page code in languages like PHP and Java
- Often, HTML code and data and logic get mixed up, making writing and maintenance difficult