Go Web Frameworks and Toolkits
Hello! Go language has many great web frameworks. In this article I want to review and implement a demo (example) project using top popular and recently updated Go frameworks and toolkits.
This page will be the primary source of all follow-up resources and an explanation of the goal and demo project. I suggest you bookmark it and check weekly for updates.
Considered Web Frameworks
- gin / 54k ✨ / last release on 24 Nov 2021
- echo / 21k ✨ / last release on 10 Jan 2022
- iris / 21k ✨ / last release on 2 Dec 2021
- fiber / 17k ✨ / last release on 31 Dec 2021
- micro / 10k ✨ / last release on 13 Jan 2022
- goa / 4k ✨ / last release on 13 Jan 2022
- gorilla toolkit / 15k ✨ / last release on ???
ℹ: last updated on: 3 Feb 2022
Project's Repository
Source code for each project as well as step-by-step implementation will be available in the following GitHub repository:
List of Features
For each demo project using one of the above frameworks we will implement the following features:
- "Hello, World!" and simple JSON response;
- CRUD JSON API for the example entity;
- Paging and error handling;
- Parsing query params;
- Accepting and parsing form data;
- Exposing static assets via an endpoint;
- Building website pages with templates;
- MVC Pattern (model, view, controller);
- Authentication and Authorization;
- Documentation and Swagger;
- Framework specific testing (if there is anything);
- Optimization (e.g. compression with GZIP);
- Security (CORS for example);
Additionally, we will also check some examples with:
- CI/CD using GitHub Actions;
- Logging, tracing, and metrics;
- Docker and Docker Compos;
- Database and ORM;
- Work with MySQL;
- Work with PostgreSQL;
- Work with MongoDB;
- Work with Redis;
- Work with Kafka;
Shared Code
We will need to use a shared code to enable some parts of the work and avoid code repetition (DRY). For this purpose, we will use the go module for each framework-specific project and the shared code. To make it work locally, we will use the go mod replace directive.
Demo Projects
The following section contains links to the follow-up materials — posts, video tutorials, and the source code — for each reviewed Golang Web Framework.
Demo app with Gin Web Framework
List of learning materials for the Gin web framework.
Not started yet.
Demo app with Echo Web Framework
List of learning materials for the Echo web framework.
Initialize an empty Go project and "Hello, World" page with the Echo framework
Demo app with Iris Web Framework
List of learning materials for the Iris web framework.
Initialize an empty Go project and "Hello, World" page with the Iris framework
- Watch the step-by-step guide (link coming soon)
- Check the source code of this step
Demo app with Fiber Web Framework
List of learning materials for the Fiber web framework.
Full Courses
- Building CRUD JSON Apis with Golang Fiber
➡️ ️YouTube Full Tutorial Video (1 hour and 21 mins long)
Short Tutorials
Demo app with Micro Web Framework
List of learning materials for the Micro web framework.
Not started yet.
Demo app with Goa Web Framework
List of learning materials for the Goa web framework.
Not started yet.
Demo app with Gorilla Toolkit
List of learning materials for the Gorilla toolkit.
Not started yet.