Beego Framework--fast development of HTTP framework for GO applications

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.


Beego is a fast-developing HTTP framework for GO applications, the author is Segmentfault user, go language technology Daniel @asta Xie. Beego can be used to quickly develop APIs, WEB, backend services and other applications, is a restful framework, the main design inspiration from the tornado, Sinatra, flask three frameworks, but the combination of some features of Go itself (interface, struct inheritance, etc.) and a framework designed for

Architecture of the Beego

The overall design architecture of the Beego is as follows:

Built on the basis of eight independent modules, Beego is a highly decoupled framework. When the design of the Beego is to consider the function of modular, even if the user does not apply Beego HTTP logic, but also can be used in these standalone modules, for example, you can use the cache module to do your caching logic, using the log module to record your operation information, Use the Config module to parse your files in various formats, so not just in beego development, your socket game development is also a useful module, which is why Beego is popular for a reason. If you have played Lego, you should know that a lot of high-level things are a piece of building blocks, and design beego, these modules are building blocks, high-level robot is beego. The functionality of these modules and how they are used will be described in a later document.

Beego's execution logic

Since Beego is built on these modules, what is the logic of his execution? Beego is a typical MVC architecture, and his execution logic looks like this:

BEEGO Project Structure

The directory of Beego items is as follows:

├──conf│└──app.conf├──controllers│├──admin│└──default . Go├──main.go├──models│└──models.go├──static  │├──css│├──ico│├──img│└──js└──views├──admin└──index.tpl 

From the above directory structure we can see the structure of M (models directory), V (views directory), C (Controllers directory), main.go is the entry file.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.