Is it necessary to use mock to simulate fake data in front and back-end separate development?

in the actual development, it is found that the front and back end work together to determine the input and output format, which is very time-consuming. When the fake data is simulated, sometimes the background api can be developed.
for example, some simple list data and detail data. Most of the projects have such data interfaces, which are developed very quickly, sometimes even before the fake data is simulated.
excuse me, what is the application scenario of mock? Do all big factories use mock?


just briefly describe my principles for using mock.
1. If it's just a simple data list, I'll simply follow the value below mock, and it's usually a fixed value of mock, just to populate and so on.
2. If it comes to adding, deleting, modifying and querying, I generally do not mock. At most, check the data format of the api document when sending the request (just wait for the backend to do the interface here). Later, based on the returned value, I will create a callback similar to that after sending
3. If it is clearly indicated that the business is relatively complex and takes a lot of time at the backend, I will seriously mock, and strive to ensure the accuracy of my previous logic before the backend finishes the interface.

as for other application scenarios, I think it's about the same on the first floor.


large front and rear teams
remote
complex business


provides an idea;
the display data is determined by the front end. During the development of the backend interface, you can refer to the requirement + UI, design the data structure (usually the infrastructure needs to be determined in advance with the back end), and then adjust the field name after the interface is developed.
the submitted data is determined by the backend, which is usually not a rigid requirement for the front end in the initial development.

display data can simulate all kinds of limit data with mock, which is very beneficial to the initial development.
recommends the easy-mock project of Hangzhou Da Sou Automobile Service Co., Ltd., which supports cross-domain and convenient registration
https://www.easy-mock.com/login

.
Menu