Beego: An Overview and Comparison with Other Framework

Eric Azka Nugroho
4 min readSep 13, 2023

--

Author: Eric Azka Nugroho, Muhammad Ghifari Taqiuddin, Raihan Farid

Many tech companies like Google, Apple, and Facebook shifted their programming language into Golang. Although Golang is a young language, Golang was meant to simplify the process of software product development. Go is an open source programming language that was developed by the Google Team. Golang itself was open to the public in 2009, but it was invented by three Google developers (Robert Griesemer, Rob Pike, and Ken Thompson) in September 2007. It was first meant to improve Google’s workflow. But it was developed into a public programming language. In 2019, it was revealed that 66% of Go users use Golang as their programming language for Web Development purposes.

Back then, Go used C as their primary programming language which is why their programming language is somewhat similar to C. If someone has a good background of C or Java programming language, they would most likely be aware of Go since there are only minor changes in the programming language. This is why Go has become one of the programming languages that is easy to learn. Go has become somewhat popular in the web community, which is why they have several frameworks offering developers a diverse array of tools and options to explore.

Beego is one of the frameworks that was launched by Go. Beego is a framework that can be used as a website backend, web application, and complicated REST API. Which is why Beego is not recommended for beginners. Beego contains a feature called Bee Tool, which allows users to compile, test, and deploy automatically. In addition, Beego also has a feature called Object Relation Mapping (ORM), which can be used to access databases without any query. This feature would allow users to fasten the process of developing their project.

Other than Beego, Go also launched a framework called Revel. Revel is a framework that is popular with their complete features and functions. So, regardless of how big or small our project, it would be beneficial if we use Revel because of its complete feature and function. One of the most used features in Revel is Migration Friendly, which allows users to migrate their application from other Go frameworks. Apart from that, the users would not need to copy and paste their code to create the same component. Revel provides a reusable MVC component, which the user would only need to create one component and can be used multiple times.

Comparison

In this section we will compare Beego to Revel, another Golang framework and Next.js, a JavaScript framework

Purpose

Begoo’s main purpose is for making a website using the MVC pattern and also can be used for building complex REST API. Revel on the other hand is a framework for writing MVC website, while Next.js can be used for both fullstack and REST API. All of them are classified as fullstack framework. With Revel, you have the option to use its own templating engine called ACE for rendering your page

Speed & Performance

In terms of speed, both Golang framework can easily surpass JavaScript, or Node.js in this case, since Go is a compiled language and JavaScript needs to be interpreted first before executed. Golang was also created with networking support in mind so many of the default libraries are already well suited for building a performant web app

Popularity

The three of them are really popular, but Next.js is widely known since it’s being promoted and backed by a large company called Vercel Inc, who’s also been on the web business since 2015. So when users have a question or found issue with Next.js, it is possible that someone has already answered those long time ago, or it’s already being reported and fixed.

Ease of use

In terms of easiness, to build a fullstack website with the Next.js, you need to only have an understanding of HTML, CSS, and JavaScript since JavaScript is used as the backend, whereas if you choose to use either Beego or Revel, you need to also learn Go for writing the backend.

Builtin Library Support

In case of builtin library support, Beego has wider array of builtin library support for writing a website. For example, it includes an ORM module, used when you want to connect your backend to a database, which Next.js and Revel doesn’t have. With Next.js, you need to use other library such as Prism.js and for Revel, you need to use GORM.

Framework Architecture

Source: github.com/beego/beego

Sample Source Code

A simple hello world code using beego

The above example prints Hello world to your browser, it shows how easy it is to build a web application with beego.

Further Read and Tutorials

References

--

--