After playing with the net/http package to understand how it works, I tried Gorilla and Beego.
Beego is a "batteries included" Framework, it seems very similar to Django (Python), on the other side Gorilla is more a set of components that can be used together, Gorilla feels more like a microframework Flask-like (Python).
I would love if we can talk about our experience with Web Framework.
Which Framework are you using? How you compare it to your former web framework?
What are the Pros/Cons?
Here a short list of the popular Go Web Frameworks:
- Beego : http://beego.me/
- Revel : http://revel.github.io/
- Gorilla : http://www.gorillatoolkit.org/
- Gin-gonic : https://gin-gonic.github.io/gin/
- Goji : https://goji.io/
- Martini : http://martini.codegangsta.io/
- Traffic : https://github.com/pilu/traffic
- Gooo : https://github.com/aaronlifton/Gooo
You can use a dispatcher library like httprouter to get slightly more convenient URL routing and parameter capture. There are a whole bunch of "middleware" libraries that intercept requests and provide sessions, CSRF protection, &c --- and no one "framework" provides all of them.
But keep net/http visible in your code. It'll maximize compatibility with other libraries, keep you from having to write bizarre shims, and ensure your code is idiomatic.
When someone writes a library that coherently unifies persistence and request handling and view rendering, it'll be time to consider frameworks. But current Golang frameworks aren't ambitious enough to be worth the headache of, in effect, coding to an idiosyncratic alternate universe of request handling.