diff --git "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/What's Next.md" "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/What's Next.md" index 8dd13b3ed52..cd470745bb2 100644 --- "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/What's Next.md" +++ "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/What's Next.md" @@ -3,15 +3,15 @@ slug: /quick-next title: "What's Next" hide_title: true sidebar_position: 10 -keywords: [GoFrame,GoFrame Framework,Web Server,Development Manual,Modular Design,Low Coupling,Video Tutorial,Project Scaffold,Business Project,Development Process] -description: "Quickly understand the development process and features of the Web Server API by viewing the development manual sections to resolve any doubts. GoFrame is a low-coupling, modular design framework with independent module designs, and independently written documentation. The community provides introductory video tutorials, and later a complete business project will be developed using the GoFrame framework project scaffold." +keywords: [GoFrame,GoFrame Framework,Web Server,Documents,Modular Design,Low Coupling,Video Tutorial,Project Scaffold,Business Project,Development Process] +description: "Quickly understand the development process and features of the Web Server API by viewing the Documents sections to resolve any doubts. GoFrame is a low-coupling, modular design framework with independent module designs, and independently written documentation. The community provides introductory video tutorials, and later a complete business project will be developed using the GoFrame framework project scaffold." --- ## Learning Summary -Through the quick sections, you should have understood the complete development process of the `Web Server` API and mastered some practical features. In these sections, we only touched on them briefly; for more detailed explanations and introductions to functional features, please refer to the corresponding development manual sections. When you feel confused about the use of a particular module, it is recommended to carefully read the corresponding development manual sections, which provide detailed explanations of the important functional features, usage methods, and common issues of each component. +Through the quick sections, you should have understood the complete development process of the `Web Server` API and mastered some practical features. In these sections, we only touched on them briefly; for more detailed explanations and introductions to functional features, please refer to the corresponding Documents sections. When you feel confused about the use of a particular module, it is recommended to carefully read the corresponding Documents sections, which provide detailed explanations of the important functional features, usage methods, and common issues of each component. :::info -If you start browsing the development manual, it should be noted that since `GoFrame` is a low-coupling, modular design, each module is relatively independent. Therefore, the documentation in the development manual is also written based on modularity, with each chapter introducing only the usage of the corresponding component itself. +If you start browsing the Documents, it should be noted that since `GoFrame` is a low-coupling, modular design, each module is relatively independent. Therefore, the documentation in the Documents is also written based on modularity, with each chapter introducing only the usage of the corresponding component itself. ::: What should we do next? diff --git "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\270\255\351\227\264\344\273\266\345\210\235\350\257\225\347\224\250.md" "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\270\255\351\227\264\344\273\266\345\210\235\350\257\225\347\224\250.md" index 233f59621af..33fc009debb 100644 --- "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\270\255\351\227\264\344\273\266\345\210\235\350\257\225\347\224\250.md" +++ "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\270\255\351\227\264\344\273\266\345\210\235\350\257\225\347\224\250.md" @@ -106,7 +106,7 @@ We access http://127.0.0.1:8000/?name=john&age=18 and can see that the page outp ![img.png](img.png) -We try an incorrect parameter request http://127.0.0.1:8000/ and can see that the page output also matches the expectation. +We try an invalid parameter request http://127.0.0.1:8000/ and can see that the page output also matches the expectation. ![img_4.png](img_4.png) diff --git "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\275\277\347\224\250\350\247\204\350\214\203\350\267\257\347\224\261.md" "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\275\277\347\224\250\350\247\204\350\214\203\350\267\257\347\224\261.md" index 75993bc9460..3e34a75608b 100644 --- "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\275\277\347\224\250\350\247\204\350\214\203\350\267\257\347\224\261.md" +++ "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\344\275\277\347\224\250\350\247\204\350\214\203\350\267\257\347\224\261.md" @@ -3,15 +3,15 @@ slug: '/quick/strict-router' title: 'Standard Routing' hide_title: true sidebar_position: 5 -keywords: [GoFrame, GoFrame framework, strict routing, route registration, data structure, route object management, Go language, web server, HTTP methods, route callbacks] -description: "Use strict routing in the GoFrame framework to simplify route registration, focusing on business logic. Standardize route registration by defining request and response data structures, and manage routes using an object-oriented approach to enhance code maintainability. Provides complete sample code and execution results to guide readers in applying it to real projects." +keywords: [GoFrame, GoFrame framework, standard routing, route registration, data structure, route object management, Go language, web server, HTTP methods, route callbacks] +description: "Use standard routing in the GoFrame framework to simplify route registration, focusing on business logic. Standardize route registration by defining request and response data structures, and manage routes using an object-oriented approach to enhance code maintainability. Provides complete sample code and execution results to guide readers in applying it to real projects." --- -To simplify the route registration method and avoid some tedious parameter handling details, allowing developers to focus on the business logic itself, the `GoFrame` framework provides a standardized route registration method. We name this standardized route registration method **Strict Routing** to make it straightforward and intuitive. +To simplify the route registration method and avoid some tedious parameter handling details, allowing developers to focus on the business logic itself, the `GoFrame` framework provides a standardized route registration method. We name this standardized route registration method **Standard Routing** to make it straightforward and intuitive. ## Data Structure Definition -In strict routing, we define a request data structure to receive parameters submitted by the client, and at the same time, we need to define a return object. The purpose is for future return parameter extensions and to standardize API documentation generation. +In standard routing, we define a request data structure to receive parameters submitted by the client, and at the same time, we need to define a return object. The purpose is for future return parameter extensions and to standardize API documentation generation. ```go type HelloReq struct { g.Meta `path:"/" method:"get"` @@ -107,7 +107,7 @@ After running, we visit http://127.0.0.1:8000/?name=john&age=18 and see that the ![img.png](img.png) -We try an incorrect parameter request http://127.0.0.1:8000/ but find that the page does not output any results. **This is because the parameter validation failed and did not enter our route callback function, but was directly returned by the `Server`.** +We try an invalid parameter request http://127.0.0.1:8000/ but find that the page does not output any results. **This is because the parameter validation failed and did not enter our route callback function, but was directly returned by the `Server`.** ## Learning Summary diff --git "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\347\273\237\344\270\200\350\277\224\345\233\236\347\273\223\346\236\204.md" "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\347\273\237\344\270\200\350\277\224\345\233\236\347\273\223\346\236\204.md" index 6bdafc5b073..64b9c614e6b 100644 --- "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\347\273\237\344\270\200\350\277\224\345\233\236\347\273\223\346\236\204.md" +++ "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\347\273\237\344\270\200\350\277\224\345\233\236\347\273\223\346\236\204.md" @@ -157,7 +157,7 @@ After running, we visit http://127.0.0.1:8000/?name=john&age=18 and see that the ![img_3.png](img_3.png) -We try an incorrect parameter request http://127.0.0.1:8000/ and see that the page output still matches the expectation. +We try an invalid parameter request http://127.0.0.1:8000/ and see that the page output still matches the expectation. ![img_5.png](img_5.png) diff --git "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\350\257\267\346\261\202\346\225\260\346\215\256\347\273\223\346\236\204.md" "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\350\257\267\346\261\202\346\225\260\346\215\256\347\273\223\346\236\204.md" index 614d8b97448..527b7942937 100644 --- "a/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\350\257\267\346\261\202\346\225\260\346\215\256\347\273\223\346\236\204.md" +++ "b/i18n/en/docusaurus-plugin-content-docs/current/quick/\345\277\253\351\200\237\345\274\200\345\247\213/\350\257\267\346\261\202\346\225\260\346\215\256\347\273\223\346\236\204.md" @@ -63,7 +63,7 @@ func main() { } ``` In this example: -- We use the `r.Parse` method to map request parameters onto a request object, allowing us to use parameters in an object-oriented manner. The `r.Parse` method automatically parses client-submitted parameters and assigns them to the specified object. There is a fixed name mapping logic internally, which you will learn in detail in the type conversion component of the development manual, and it is not elaborated on here. +- We use the `r.Parse` method to map request parameters onto a request object, allowing us to use parameters in an object-oriented manner. The `r.Parse` method automatically parses client-submitted parameters and assigns them to the specified object. There is a fixed name mapping logic internally, which you will learn in detail in the type conversion component of the documents, and it is not elaborated on here. - Additionally, we have added validation logic in this example to ensure that the `Name` and `Age` parameters cannot be empty. ## Execution Result @@ -72,7 +72,7 @@ After running it, when we visit http://127.0.0.1:8000/?name=john&age=18, we can ![img.png](img.png) -Let's try an erroneous parameter request at http://127.0.0.1:8000/, and we can see that parameters are validated as expected, with the page output also matching expectations. +Let's try an invalid parameter request at http://127.0.0.1:8000/, and we can see that parameters are validated as expected, with the page output also matching expectations. ![img_2.png](img_2.png) @@ -81,7 +81,7 @@ Let's try an erroneous parameter request at http://127.0.0.1:8000/, and we can s In this chapter, we learned to avoid the problem of hardcoding parameter names by using structured request objects, allowing for better maintenance of parameter names, descriptions, and type definitions. However, there are still areas for improvement in this sample code: -- The `r.Parse` operation is business-independent and should be handled separately from business logic. +- The `r.Parse` is non-business operation and should be handled separately from business logic. - If there are many APIs, performing `r.Parse` in all of them becomes cumbersome. - Regarding data validation, if there are many API parameters, performing numerous `if` data validation operations becomes overly cumbersome.