3 ms·
Ask HN: Which Go web framework should i use in 2016?
Hi HN !
I am currently searching for an alternative to PHP with Go but I cannot find any advice on which go framework could be as great as Symfony or Laravel. Can anyone help me find the next big thing ?
Matt Loye
- alecthomas 10y agoI don't know whether those are high level frameworks, but if they are, a Go equivalent is probably Revel [1] 1. https://revel.github.io/ https://revel.github.io/
- kasey_junk 10y agoIf you are looking for a "framework" in the php/rails mode go is likely not a great fit. The best I can point to would be Gorilla.
- dsparkman 10y agoAnother one that has gotten quite mature in the Go space is Beego: https://beego.me/ https://beego.me/ There is even a fairly good book on using Beego to develop web apps with Go. https://astaxie.gitbooks.io/build-web-application-with-golang/content/ https://astaxie.gitbooks.io/build-web-application-with-golan...
- purans 10y agoFirst question I would ask is do you really need a web framework? With Go, the way language is built or designed - you don't need crazy frameworks. Having said that I do use gorilla package a lot to re-use some of the common middlewares and packages which wouldn't make sense to re-write. But, for API endpoints and all that I am directly using Go.
- sfrailsdev 10y agoYou don't need crazy frameworks in any language. However I think about the things different frameworks give me. Generation of database migrations and other standard elements, an ORM and/or query DSL so my SQL code can be more DRY, a community with a shared code base so that I don't have to rediscover every solution or rewrite everything for my particular use case, and additional domain knowledge that is transferable to other projects/companies so that I can be immediately productive. I mean I like Go, and I understand that layer of abstraction can be frustrating, especially in a typed language, but that layer of abstraction can also be incredibly useful.
- tmaly 10y agoMatt, there a tons of frameworks at different levels. There are ones like Beego (https://beego.me/docs/intro/ https://beego.me/docs/intro/) that others have mentioned that have all the batteries included. Others like Gin (https://github.com/gin-gonic/gin https://github.com/gin-gonic/gin) that have a lot built in and offer an stable API and good performance. Gorilla (http://www.gorillatoolkit.org/ http://www.gorillatoolkit.org/) offers pieces you tie together but are at a lower level of abstraction. If you use the standard library, you have to build a little bit more, but you do not have to deal with dependencies or changes in 3rd party APIs.