Need advice about which tool to choose?Ask the StackShare community!

Gin Gonic

299
322
+ 1
16
Revel

35
100
+ 1
38
Add tool

Gin Gonic vs Revel: What are the differences?

Introduction

Gin Gonic and Revel are both popular web frameworks in Go. While they serve similar purposes, they have key differences that set them apart. Here are the 6 main differences between Gin Gonic and Revel.

  1. Routing: Gin Gonic uses a routing framework that allows for more control and flexibility in defining routes. It supports both traditional routing patterns and more advanced patterns like regex-based routing. On the other hand, Revel follows a more opinionated approach and uses a controller-based routing system, where routes are defined based on the controller and action names.

  2. Conventions and structure: Gin Gonic follows a minimalist approach and allows developers to choose their own folder structure and naming conventions for controllers, middleware, etc. It provides flexibility to organize the codebase as per the developer's preference. In contrast, Revel follows a predefined structure and enforces strict naming conventions for controllers, models, and views. This can be helpful for developers who prefer a convention-over-configuration approach.

  3. Middleware: Gin Gonic provides a middleware engine that allows developers to easily add functionality like logging, authentication, etc. to their applications. It offers a wide range of built-in middleware options and makes it easy to create custom middleware. Revel, on the other hand, has a built-in set of middleware functions that handle common tasks like session, cookies, etc. Developers can use these middleware functions without having to configure them explicitly.

  4. Template engine: Gin Gonic does not come with a built-in template engine. However, it provides integration with popular template engines like HTML/template or Pongo2, allowing developers to choose the one that best fits their needs. Revel, on the other hand, comes with its own template engine called Revel Templates. It follows a similar syntax to other Go templating engines like HTML/template but provides additional features like template inheritance and automatic reloading.

  5. Testing: Gin Gonic provides built-in support for testing with its httptest package. Developers can easily write tests for their routes and middleware using the provided testing utilities. On the other hand, Revel includes a robust testing framework that allows developers to write tests for controllers and actions. It provides various testing helpers and utilities that make it easier to write and execute tests.

  6. Performance: Gin Gonic is known for its high performance and low memory footprint. It is designed to be fast and efficient, making it suitable for high-performance applications. Revel, on the other hand, focuses on developer productivity and provides features like hot code reloading, which can impact performance to some extent.

In summary, Gin Gonic offers more flexibility in terms of routing, structure, and middleware, while Revel follows a more opinionated approach with its predefined conventions and built-in features like the template engine and testing framework. Gin Gonic also excels in performance, whereas Revel prioritizes developer productivity.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Gin Gonic
Pros of Revel
  • 11
    Hight performance
  • 5
    Open source
  • 16
    Go
  • 6
    High-Productivity
  • 5
    Full-Stack
  • 4
    High performance
  • 4
    MVC
  • 2
    Open source
  • 1
    Simple

Sign up to add or upvote prosMake informed product decisions

Cons of Gin Gonic
Cons of Revel
  • 2
    Low performance
  • 1
    No wildcard routing
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What is Gin Gonic?

    It is an HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance. It is up to 40 times faster.

    What is Revel?

    Revel makes it easy to build web applications using the Model-View-Controller (MVC) pattern by relying on conventions that require a certain structure in your application. In return, it is very light on configuration and enables an extremely fast development cycle.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Gin Gonic?
    What companies use Revel?
    See which teams inside your own company are using Gin Gonic or Revel.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Gin Gonic?
    What tools integrate with Revel?
      No integrations found
      What are some alternatives to Gin Gonic and Revel?
      Echo
      It is a high performance, extensible, minimalist web framework for Go (Golang).
      Iris
      The fastest web framework for Go.
      Flask
      Flask is intended for getting started very quickly and was developed with best intentions in mind.
      Django
      Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
      Node.js
      Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
      See all alternatives