search

Home  >  Q&A  >  body text

laravel - What are the advantages and disadvantages of separating the front and back ends?

Question: How should we understand the separation of front-end and back-end development? What are the implementation methods? What are the advantages and disadvantages of separation? What kind of projects are suitable? How to choose separation or non-separation when developing specific projects? , if you have any experience, please feel free to enlighten me~

The following is my understanding of the separation and non-separation of front-end and back-end development. Please let me know if there is anything inappropriate~

Separation of front and back ends:

Manifestation: Front-end development projects are separated from back-end development projects. Communication is through cross-domain requests (often through proxies in development situations). Page routing is processed by the front-end. All data is obtained through requests. ;
Features:
Front-end and back-end development do not affect each other;
The front-end can centralize all data, and the application data can be accessed on all pages, which can avoid repeated requests to obtain the same data;
The time required to load data after loading the page. Sometimes there will be data delay or failure to load data;
Flag: /#/, there is this flag after the domain name in the URL
Development method:
1) Separate during development and merge after development is completed, for example:
For projects established through vue-cli, after the front-end development is completed, the generated front-end resources The files are merged into the back-end project (such as laravel);
2) Separate during development and remain separated after development, such as:
ionic Hybrid APP project

The front and back ends are not separated:

Expression form: The front-end project and the back-end project are the same, the page routing is processed by the back-end, and data can be returned at the same time. Data communication does not need to cross domains;
Features:
During development, the front-end and back-end are closely connected, and there will be mutual influence;
The back-end returns the data required for the page at the same time when returning the page, so the user will not appear when accessing a certain page. Data delay or failure to obtain data;
Development method:
laravelbladetemplate form

Related Links

Evolution of Web R&D model
After reading the above article, I feel I have a little more understanding, but I haven’t fully understood it yet

天蓬老师天蓬老师2778 days ago1027

reply all(2)I'll reply

  • 漂亮男人

    漂亮男人2017-05-16 16:51:46

    The question is based on technical considerations. In fact, whether to separate or not is determined by business and cost. If you have enough front-end and back-end developers, and the business is relatively complex, of course the front-end and back-end must be separated, and professional people do professional things, which is beneficial to demand quality and later maintenance. However, the separation of front-end and back-end will also increase communication costs. You need to understand both the front-end and back-end of your business, and there are additional front-end and front-end joint debugging and testing links.

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 16:51:46

    Advantages:
    After agreeing on the interface, you can focus on your own part, front-end and back-end development can be done in parallel, efficiency can be improved, and quality and later maintenance can also be greatly improved.

    Disadvantages:
    Communication costs and personnel costs.

    reply
    0
  • Cancelreply