BudWk V7 builds a microservice development framework from scratch - 01 Setting goals

Cause and effect

BudWk (formerly known as NutzWK) is a development framework that the author has been researching since the era of strust1+jsp development and later open-sourced. The Json data format just became popular around 2012, and the original Jsp file development method is not convenient for code reuse and Maintenance, and the emerging SSH development mode has disadvantages such as configuration troubles and difficult to locate errors. I found nutz to be good, simple and convenient, low learning cost, and high development efficiency. Based on her and the later nutzboot, I developed V1 to V6. , V7 and other framework versions.

Why "start from scratch"

Both V5 and V6 are micro-service distributed architectures (the difference is that V6 is completely separated from the front and back ends), but they do not introduce gateways. Although the business layer can be deployed in a distributed manner, the control layer is still aggregated together, resulting in their "" Microservices" is not complete. In actual project development, there are disadvantages such as different subsystems or modules cannot be well separated, and some common components cannot be reused well, which cannot be well adapted to the company's "integrated platform". "project needs.

initial goal setting

V7 needs to have these features:

  • API Gateway

Need to support prefix routing, automatic routing mechanism, blacklist mechanism, need to support websocket

  • Relatively simple API documentation definition

V6's Swagger V3 (OpenAPI) annotation definition is too cumbersome and needs to be greatly simplified

  • Background form validation function

Before V7, the form validation function has not been implemented, and handwritten judgment is really troublesome.

  • Unified exception capture and friendly error prompts

Before V7, the front end cannot print specific error information, you need to go to the server to view the log, V7 needs to be in debug mode, in the front end to view the detailed information of the error

  • fully componentized

Componentization can be highly reused, and functions can be realized with simple configuration. A project or a company can maintain a set of component libraries.

{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324052818&siteId=291194637