If you are not just a point worker, then you should know the difference between front-end and back-end separation and non-separation

There are two main modes of web application development:

  • Front and rear ends are not separated

  • Separation of front and rear ends

Understanding their differences helps us to test the corresponding products.

Front and rear ends are not separated

In the early days, web application development mainly adopted the method of not separating the front and back ends. It is a development mode that mainly renders the template directly at the back end to complete the response. The architecture diagram of the web application developed in a way that the front and back ends are not separated is as follows:

picture

If you want to learn interface automation testing, here I recommend a set of videos for you. This video can be said to be the number one interface automation testing tutorial on the entire network at station B. At the same time, the number of online users has reached 1,000, and there are notes to collect and use. Technical exchanges of various masters: 798478386      

[Updated] The most detailed collection of practical tutorials for automated testing of Python interfaces taught by station B (the latest version of actual combat)_哔哩哔哩_bilibili [Updated] The most detailed collection of practical tutorials for automated testing of Python interfaces taught by station B (actual combat) The latest version) has a total of 200 videos, including: 1. [Interface Automation] The current market situation of software testing and the ability standards of testers. , 2. [Interface Automation] Fully skilled in the Requests library and the underlying method call logic, 3. [Interface Automation] interface automation combat and the application of regular expressions and JsonPath extractors, etc. For more exciting videos, please pay attention to the UP account. https://www.bilibili.com/video/BV17p4y1B77x/?spm_id_from=333.337 

picture

The browser initiates a request to the server, and the server fetches the data from the database after receiving the request, then renders the HTML template and returns the rendered HTML data, or returns a redirection. Most of the work is processed on the backend, and the client (browser) is only responsible for page display and user interaction.

This development method has the following characteristics:

  • Generally, an application only needs one background server

  • The client only needs to request different pages, and the server will complete all the data logic on the page, so the number of http requests is less

  • Each request is an HTML, there will be a lot of redundant data

  • During development, the front-end and back-end codes are highly coupled, and the responsibility for problems is not clear

  • When developing a simple website, the efficiency is very high

  • The response data is HTML, which can only be adapted to a single client. When multi-terminal support is required, it needs to be developed separately

picture

Separation of front and rear ends

With the emergence of AJAX technology, http requests can be sent to the server without refreshing the page, so the development mode of front-end and back-end separation has emerged.

The backend only needs to develop the interface, and the frontend can get the data from the backend by initiating an AJAX request, render and how to call the interface, and hand it over to the frontend. The structure diagram of the web application developed in the way of front-end and back-end separation is as follows:

picture

This development method has the following characteristics:

  • Is the current mainstream model of Web development

  • Requires static file server and backend interface server

  • The background server only provides data interface services, and the response is often JSON data

  • During development, the front-end and back-end responsibilities are clearly divided

  • Front-end and back-end decoupling can be developed at the same time, improving development efficiency

  • One background can meet the needs of various applications such as websites, apps, and small programs

picture

picture

Summarize

For applications where the front and back ends are not separated, generally only functional testing is required. For applications where the front and back ends are separated, both functional testing and interface testing are required, and when performing functional testing, it is also necessary to analyze whether the bug is a front-end or back-end problem.

Guess you like

Origin blog.csdn.net/caixiangting/article/details/132170665