The premise

Due to the advance of modular componentization of front-end projects, front-end workload is greatly reduced and maintainability is becoming stronger and stronger. At the same time, the number of front-end teams continues to increase, and if the front-end is responsible for more work content (prototyping, interface design, database design, etc.) that is not too heavy on front-end positions, the front-end may become a little bit of everything, nothing. In order for front-end expertise to be more specialized and share some of the work of back-end colleagues, it is necessary to provide better solutions to existing problems and demonstrate the importance of the front end.

The status quo

  1. Inconsistent response data structure: The domain model of the backend and the front-end is inconsistent, and the backend needs to adjust the response data structure
  2. Low efficiency: The front-end interface can be debugable only after the back-end interface is developed
  3. Response data redundancy: Some interfaces may be universal and fields cannot be deleted easily

The next step

Use NodeJS + graphQL

  1. The front end splices the response data structure itself to reduce data redundancy.
  2. The front-end mock data itself, development and debugging is not limited to the back-end
  3. According to the business logic, targeted to achieve interface caching
  4. After the front end is involved in the server, the front end components become more flexible (such as table dynamic rendering header, etc.)
  5. One-click document generation allows the backend to develop interfaces based on the front-end documents, thus reducing the backend interface design time. The backend can perform more microservice splitting, underlying optimization, and database design based on the backend domain model

The related documents

  • Front-end development – Domain driven design
  • Technology-driven: from what aspects does the synergistic efficiency of the front and rear end push forward
  • GraphQL development principles