-
最新バージョン(2016/02/06 時点)
- v1.0 on 20 May 2014
-
最初のリリース
- Pre-release v0.1 on 5 Dec 2013
-
Github スター
- 8,177
- Github スター数一番人気(martini, revel, goji)
- シンプル
- 他のGolangパッケージとの協調性
- パスマッチングとルーティング
- モジュラーデザイン - 機能性の付け外しが簡単
- たくさんの良いハンドラ/ミドルウェア
- http.HandlerFuncとの完全な互換性
- リリースはあまり頻繁でない。現在も開発は行われている
go get github.com/go-martini/martini
package main
import "github.com/go-martini/martini"
func main() {
m := martini.Classic()
m.Get("/", func() string {
return "Hello world!"
})
m.Run()
}
go run server.go
MIT
-
最新バージョン(2016/02/06 時点)
- v0.12.0 on 26 Mar 2015
-
最初のリリース
- Pre-release v0.6 on 16 Sep 2013
- v0.8 on 6 Jan 2014
-
Github スター
- 6,336
- フルスタック系
- シンプルではないので Go の思想好きからの支持は低め
- Hot Code Reload
- routing
- parameter parsing
- validation
- session/flash
- templating
- caching
- jobs
- 非同期に処理を実行するための仕組み
- cron 実行っぽいこともできる
- test framework
- internationalization
- Stateless
- Modular
- 例)ルータをカスタムルータに置き換える
- 2014 年よりはリリース速度など落ちているみたいだけど、現在も開発は行われている
go get github.com/revel/revel
go get github.com/revel/cmd/revel
cd $GOPATH
revel new github.com/mid0111/hello-revel
~
~ revel! http://revel.github.io
~
Your application is ready:
/Users/mid0111/.gvm/pkgsets/go1.5/global/src/github.com/mid0111/hello-revel
You can run it with:
revel run github.com/mid0111/hello-revel
tree
.
├── README.md
├── app
│ ├── controllers
│ │ └── app.go
│ ├── init.go
│ └── views
│ ├── App
│ │ └── Index.html
│ ├── debug.html
│ ├── errors
│ │ ├── 404.html
│ │ └── 500.html
│ ├── flash.html
│ ├── footer.html
│ └── header.html
├── conf
│ ├── app.conf
│ └── routes
├── messages
│ └── sample.en
├── public
│ ├── css
│ │ └── bootstrap.css
│ ├── img
│ │ ├── favicon.png
│ │ ├── glyphicons-halflings-white.png
│ │ └── glyphicons-halflings.png
│ └── js
│ └── jquery-1.9.1.min.js
└── tests
└── apptest.go
12 directories, 19 files
# サーバ起動
revel run github.com/mid0111/hello-revel
# テスト実行用の画面表示
open http://localhost:9000/@tests
# コマンドラインからテスト実行
revel test github.com/mid0111/hello-revel/
MIT
-
最新バージョン(2016/02/06 時点)
- v0.9.0 on 1 Feb 2015
-
最初のリリース
- v0.8 on 2 Nov 2014
-
Github スター
- 2,945
- minimalistic
- routing
- Middleware
- Graceful shutdown, graceful reload
- fully composable with net/http
- http.Handler として使える
- サードパーティ製ライブラリと合わせて使える
- 2014 年よりはリリース速度など落ちているみたいだけど、現在も開発は行われている
-
シンプル、必要最低限であること
- ディレクトリのどこに何をおいたらいいかをフレームワークに強制してほしい人には向かない
-
後述の Martini と設計思想は同じだけど、Martini と違い、黒魔術を使っていない
MIT
- Martini
- revel ほどのフルスタックではないけど、Middleware とかと合わせると web フレームワークとしての機能は十分そう
- スター数1位、v1.0、信頼できそう
- Revel
- 設計のためのコスト負担を減らしてくれそう
- Revel の開発止まったら死ぬ
- Revel ならではのルールのための勉強コストがかかる
- Goji
- シンプルなので自由がきくのは便利そうだけどシンプルすぎっぽい
- 関係ないけどいいリリースノートの管理方法だな
https://github.com/revel/revel/releases/tag/v0.12.0
- mattn さんがつくってる
- 環境毎に切り替えられる
- gom lock を実行すれば Gomfile.lock が作られて、以降の gom install では依存ライブラリのバージョンを正確に反映できます
- github スター数そこそこ
- メンテナンスもされている
結構メジャープロジェクトで使われている。
Martini と似てるけどとにかく早いらしい。
https://github.com/gin-gonic/gin