6 ms·
web.go is old and not maintained. If you're new to Go and wants a framework check out beego (https://github.com/astaxie/beego https://github.com/astaxie/beego).
by jemeshsu 13y ago
web.go is old and not maintained. If you're new to Go and wants a framework check out beego (https://github.com/astaxie/beego https://github.com/astaxie/beego). The other popular framework is Revel which I think is "too heavy" and not my cup.
beego, revel are adaptation from other languages/framework, beego is Python/Tornado inspired and Revel is Scala/Play inspired. beego is closer to idiomatic Go than revel, i'm not expert but feel their MVC based structure might not be "congruent" to Go's interface/composition construct. Sorry I can't really explain what I meant, maybe Im just anti everything Rails like MVC for web framework.
Many Gophers prefer to use light libraries such as Gorilla to assemble their web apps, as Go already has basic http covered in standard library. Having said that it is good idea in Go land to have a recommended template/structure based on these light libraries for a best-practice web app that covers standard web components that are outside of standard libraries such as session, context, user auth etc. This is to make it quick to assemble an web app with all essential, and a common code structure that makes maintenance easy -> the advantages of a framework. Or maybe we do need to use a web "framework" for Go after all. Similar reasoning on why people are using Symphony/Laravel for PHP now.
Go is highly recommended for coding server backend components, the processing and brain of app. But should one use Go for web front end? Go web libraries/framework (beego/revel included) is not as matured as Rails/Django, so you do need alot more of your own coding for a complete web ui front. Let me break down:
* If you're are more business oriented and would like your web app up as fast as possible, use Rails/Django. I would still use Rails/Django even if your web app is only Rest API for a Angular/Ember app. You can then use Go to optimise your backend.
* If you would like to brush up your resume, by all means dip into Go for web app. As I predict it will help you 2/3 years down the road. I just noticed that irc #go-nuts has more members than ruby/rails. But then so is #haskell and yet Haskell is not as mainstream as PHP/Python/Ruby/Java.
* If you are already Rails/Django expert and am choosing between NodeJS and Go: keep on choosing as there is no clear advantage of one over the other. And you should also consider Clojure or even Scala. OK about Node vs Go for web app: NodeJS/ExpressJS has has more than a year advantage thus you see more NodeJS/ExpressJS projects. I think both are on par for time-to-market if you're developing a REST API.
* If you are novice programmer and new to web app, learn something like Rails/Django for web best practices. However because Go web library is close to metal, you will understand in greater detail on how web/http actually works by coding a web app and reading Go standard http library. You might heard that Rails/Django is passé and you might not want to waste time for something with "no future". But don't. Those are someone else opinion and Rails/Django will be around for many years to come. In fact Rails/Django is the top choice of many programmers who want to leave PHP/Java web. It is quite difficult nowadays to be a one language programmer. So pick up as main one that is current mainstream web technology (PHP, Rails/Ruby, Python/Django) and bet on one for future that is not as mainstream (Go, Clojure, Scala). It is harder for new programmer to pick up newer tech as far as learning materials go.
* If you are a superstar programmer, yes you do need to pick up Go, in addition to Haskell, Clojure, Scala, Erlang, Fortran, Basic and ARM assembly. Please do not learn go if you're a Javascript programmer who wears a Javascript t-shirt and has a Javascript soft toy (whatever) in your bed.
My 2.5 cents. To go or not to go?