📄️ 1.1 Project Introduction
Star English Book is a demonstration project using GoFrame to help users learn and manage English vocabulary, including registration and login features, and provides random review and proficiency settings. The project adopts a front-end and back-end separation model, using the GoFrame framework for development, outputting standard JSON format data for the front end to fetch and build pages through HTTP requests.
📄️ 1.2 MVC
Learn about the MVC (Model-View-Controller) design architecture, where the Model handles application data and business logic, managing data and database interactions; the View is responsible for data display and the user interface, interacting with users to present data; and the Controller processes user input and requests, acting as an intermediary between the model and the view. In a front-end and back-end separation, focus on the Controller and Model layers.
📄️ 1.3 Writing Conventions
This book uses the command line in some parts, with the dollar symbol as a prompt. It outputs information to the terminal, omitting unnecessary code to maintain cleanliness. Examples show how to perform basic output operations and code writing techniques using the GoFrame framework.
📄️ 1.4 Environment Preparation
GoFrame is a web backend framework based on the Go language, requiring Go version 1.20 or above. The project development needs database support, and the examples use MySQL, which is compatible with various databases such as MariaDB and TiDB. It is recommended to use Postman or other tools for API testing. This document also introduces the GF CLI installation and project initialization process, providing a detailed explanation of the project directory structure.
📄️ 1.5 The Source Code of This Book
The source code of this book is open source on GitHub, and its open-source license is based on the MIT protocol, allowing users to use, copy, and modify the software freely without restrictions. The document details the contents and conditions of the software license to ensure that users comply with regulations when using copyrighted content, and make declarations about the applicability and liability of the software for better application and development.