The difference between front and rear end separation and front and rear end not separation

The difference between front and rear end separation and front and rear end not separation

No separation of front and rear ends

In the application mode where the front and back ends are not separated, the effects seen on the front-end page are controlled by the back-end, and the back-end renders the page or redirects, that is, the back-end needs to control the display of the front-end, the front-end and the back-end 耦合度很高.

This application mode is more suitable for pure web applications, but when the backend is docked with the App, the App may not need the backend to return an HTML page, but only the data itself, so the interface that the backend originally returns to the webpage is no longer suitable for the frontend App. Application, in order to connect
to the back end of the App, it is necessary to develop a set of interface and request data interaction as shown below:
Insert picture description here

Front and rear separation

In the application mode where the front and back ends are separated, the back end only returns the data required by the front end, and no longer renders the HTML page, and no longer controls the effect of the front end. As for what effect the front-end user sees, how the data requested from the back-end is loaded into the front-end is determined by the front-end itself. The webpage has the processing method of the webpage, and the App has the processing method of the App, but no matter which front-end, the required data Basically the same, the backend only needs to develop a set of logic to provide data externally.

In the application mode where the front and back ends are separated, the front and back ends 耦合度相对较低.

In the application mode where the front and back ends are separated, we usually refer to each view developed in the back end as an interface, or API, and the front end uses the interface to add, delete, modify and check data.

The corresponding data interaction is as follows:
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_46034375/article/details/108476137