Golang之web框架簡單介紹與對比

golang—-web框架簡單介紹與對比

martini 框架

這裏寫圖片描述

martini 功能列表

- 無侵入式的設計.
- 很好的與其他的Go語言包協同使用.
- 超讚的路徑匹配和路由.
- 模塊化的設計 - 容易插入功能件,也容易將其拔出來.
- 已有很多的中間件可以直接使用.
- 框架內已擁有很好的開箱即用的功能支持.
- 完全兼容http.HandlerFunc接口.

下載martini框架

    go get github.com/go-martini/martini

Beego 框架

這裏寫圖片描述

    Beego是一個完全的MVC框架,你可以使用你的Go語言專業技術構建你的web應用程序。
    Beego框架下,你可以自動化地實現測試、打包和部署。正如下面所說的一樣。
    web apps and backend services in Go. It is inspired by Tornado, Sinatra and Flask. beego has some Go-specific features such as interfaces and struct embedding.

下載Beego框架

    go get github.com/astaxie/beego

Revel 框架

這裏寫圖片描述
A high-productivity web framework for the Go language.

Revel 功能列表

    1. Hot Code ReloadEdit, save, and refresh. Revel compiles your code and   templates for you, so you don't miss a beat. Code doesn't compile? It gives you a helpful description. Run-time code panic? Revel has you covered. 
    2. ComprehensiveRevel provides routing, parameter parsing, validation,   session/flash, templating, caching, job running, a testing framework, and even internationalization. 
    3. High PerformanceRevel builds on top of the Go HTTP server, which was recently   benchmarked to serve three to ten times as many requests as Rails across a variety of loads. 

下載Revel 框架

        git clone https://github.com/revel/examples.git $GOPATH/src/github.com/revel/examples
        revel run github.com/revel/examples/booking

Goji

這裏寫圖片描述
Goji是一個輕量型的web框架,具有簡約性和靈活性的多路路由請求特性,正如它所標榜自己的那樣。

Goji的github項目地址

Gin

這裏寫圖片描述
Gin類似於Martini,但是具備更好的性能。如果你喜歡高性能和高產出,你會喜歡上Gin.

Gin的github項目地址

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章