define the data format first, and then let the backend develop. Just mock yourself at the front end
agree on the data format and fields of the interface with the backend first, and then simulate it by mock first, which can speed up the development efficiency
.
the above boss has already mentioned it, but I would like to emphasize it again: there must be interface documents, interface documents, interface documents at all times.
my following answer is about who writes the interface document, how to write it, and to what extent.
most companies maintain interface documentation in the background. Because the backend knows more about the database, it is easier to work in the background, and it takes more time
but it is great to let the front end define the interface.
because I have met before, the backstage is a novice, and I do not have the ability to write interface documents first. At this time, as the front end, I often help him decide. Although I am also a novice, I am bold, and the result is nothing more than overtime on weekends. It goes too far later. Return. As mentioned in the
question, "the front end is a data-driven framework", so you should define the interface document at the front end and list what field you want. The backend roughly evaluates whether there is such a field and whether it is convenient to return. Evaluate OK. Then do it. The front end is developed according to the documentation. no, no, no. Just use the above boss's plan in the process of development. no, no, no.
it is worth adding that if there are many people in the background (the background is more efficient,) negotiate and ask the background to give the json string first. The front end first writes down the interface. However, it is important to remind the front-end developers to pay attention to the asynchronism of the interface
if you think the answer is serious, please adopt
you get it wrong, you may not know how the front end is developed. Generally speaking, after the interface design is completed, the mock, that carries out the interface data directly according to the fields of the written corresponding interface document will not wait for the backend to finish writing the interface before doing
. In fact, the back end can start to construct the interface data when the design is completed or the prototype is finalized. After the design is completed, the front end can directly enter the development, and the data can be simulated locally or with the help of remote mock tools, waiting for your interface to be completed. I believe that the back-end interface is also completed, and then you can directly carry out data docking. The process is parallel.
agree on the data format and fields of the interface, and then moke the front end.