search

Home  >  Q&A  >  body text

javascript - What do you think about the separation of front-end and back-end?

The backend only provides data, and all other operations are left to the frontend

阿神阿神2750 days ago754

reply all(6)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-28 09:30:43

    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

    reply
    0
  • 学习ing

    学习ing2017-06-28 09:30:43

    All connections between the front and back ends go through API

    reply
    0
  • typecho

    typecho2017-06-28 09:30:43

    The backend only provides data, and all other operations are left to the frontend. This understanding is basically correct.

    reply
    0
  • 欧阳克

    欧阳克2017-06-28 09:30:43

    http://blog.jobbole.com/65513/

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-06-28 09:30:43

    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

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-06-28 09:30:43

    Front-end: responsible for the View and Controller layers, back-end: only responsible for the Model layer, business processing/data, etc.

    reply
    0
  • Cancelreply