The backend only provides api, which includes data, as well as the organization and processing of data
The front end is responsible for presenting and retrieving data
Talking about a three-tier structure with front and rear ends separated
If it’s more complicated, node+frontend will be used as the front end,
Node is just a simple express or koa, using http to request java or php server
You will definitely be thinking about what node is used for. Yes, it is a template engine
In the traditional two-tier architecture, the template engine cannot be separated, jsp and java are always in the same project, and the coupling degree is too high
Three-tier structure, node projects are sent to the production environment separately,
Then use node to request remote java or php projects, and node to request other backends are between servers, so there is no cross-domain issue
In this way, the front-end is only responsible for using node to adjust the API and the front-end template engine to render the page.
A project can get data from multiple java servers or php servers separately
For example, the formats obtained by 20 java interfaces, 20 php interfaces, and node are all based on documents
You understand it right, let me put it briefly When it was not separated before, the template was in the backend, and js and css were in the frontend, so every time you modify the style and function, you need to change the backend project After separation, the backend only provides the API interface , the front-end handles templates and styles Then the front-end uses nodejs for separation. Usually nodejs is a very thin layer in this case and is only responsible for simple functions such as routing, interface forwarding, merging, and cleaning
The backend only provides api, which includes data, as well as the organization and processing of data
The front end is responsible for presenting and retrieving data
Talking about a three-tier structure with front and rear ends separated
If it’s more complicated, node+frontend will be used as the front end,
Node is just a simple express or koa, using http to request java or php server
You will definitely be thinking about what node is used for. Yes, it is a template engine
In the traditional two-tier architecture, the template engine cannot be separated, jsp and java are always in the same project, and the coupling degree is too high
Three-tier structure, node projects are sent to the production environment separately,
Then use node to request remote java or php projects, and node to request other backends are between servers, so there is no cross-domain issue
In this way, the front-end is only responsible for using node to adjust the API and the front-end template engine to render the page.
A project can get data from multiple java servers or php servers separately
For example, the formats obtained by 20 java interfaces, 20 php interfaces, and node are all based on documents
All connections between the front and back ends go through API
The backend only provides data, and all other operations are left to the frontend. This understanding is basically correct.
http://blog.jobbole.com/65513/
You understand it right, let me put it briefly
When it was not separated before, the template was in the backend, and js and css were in the frontend, so every time you modify the style and function, you need to change the backend project
After separation, the backend only provides the API interface , the front-end handles templates and styles
Then the front-end uses nodejs for separation. Usually nodejs is a very thin layer in this case and is only responsible for simple functions such as routing, interface forwarding, merging, and cleaning
Front-end: responsible for the View and Controller layers, back-end: only responsible for the Model layer, business processing/data, etc.