Skip to main content
Version: 2.8.x(Latest)

Introduction

Due to its modular design, the GoFrame framework can be used as a utility library or for complete business project development.

Considering that most scenarios for using the framework are for developing business projects (microservices projects), the framework also provides some design and practices for engineering development for direct out-of-the-box use.

Precautions

Engineering development design is a complex "discipline." Different teams have different design styles, and in some scenarios, it is often influenced by the preferences of the team leader.

The engineering development design provided on the framework's official website is based on the author's experience in writing this section and through project pitfalls encountered in Go practice. It can help solve common engineering development problems, but we do not believe it can meet the preferences of all development teams.

Reviewing all the design sections here and understanding the background and ideas of each piece of design itself is more valuable than directly using framework components and tools.

Documents

📄️ Project Structure🔥

The method of project directory design in the GoFrame framework, based on the three-layer architecture model and improved with modern engineering practices to provide a universal and flexible directory structure design for complex business projects. Directory components include modules such as api, internal, dao, and logic, supporting various business scenarios while encouraging developers to flexibly add or remove directories for specific application implementations.

📄️ Structured Programming

How to improve code design through structured programming in the GoFrame framework, detailed analysis of unstructured problems encountered in the controller and service layers, and provides the advantages and examples of using structs to manage parameters. By structurally managing interface input and output, it simplifies parameter reception, validation, and conversion processes, boosts productivity, reduces maintenance costs, and facilitates easier interface documentation generation and standardized error handling mechanisms.

📄️ Mono-Repo Management

GoFrame framework's support for microservices-mono-repo management mode, detailing how to conduct code development and service collaboration in this mode. Discusses the pros and cons of mono-repo management and how to optimize microservice collaboration by dividing repository responsibilities, managing code visibility, unifying image repositories, and more. Also, provides relevant framework commands to help developers efficiently manage and deploy microservice projects.