| I'm a full-time Golang developer, the last product I shipped was a Rails app, and my career started in the 90s as a shrink-wrap C software developer. Golang is an unpleasant environment in which to build web applications: * Good SQL persistence abstractions aren't there yet, so realistic SQL-backed applications depend on writing tons of raw SQL and (worse) parsing results. Like a savage. * Golang's built-in templating is good for self-contained full templates but not great for hierarchies of templates and partials. * Golang's net/http library is so good that it's a gravity well for other request handling abstractions, so that sessions, CSRF tokens, and access control either have to be built directly on Golang's equivalent of Rack, or inevitably get put into libraries that conceal too much of net/http. "Going with the flow" and writing idiomatic Golang code feels a lot like writing those Sinatra apps where you get 1/3rd of the way through and regret not just using Rails. You can totally write a good web app in Golang, especially if you're doing minimal serverside HTML generation and leaning on something like React or Angular or Ember instead. But it's not what Golang is best at. Meanwhile, Scala is both a language designed in part for serverside web apps and built on the JVM. If you're writing a web application, where your functionality is exposed by a port 443 that Firefox connects to directly and asks for "/" from, I'd prefer Scala to Golang. Reasonable people can disagree or object to any of this, but I'm not going to waste time sugarcoating. |
Beg-to-differ: 1) Templating works very well for me. You can pass variables to embedded template "partials" within a template. You can define your own functions for the templating engine to use etc. 2) net/http + gorilla (or something similar) and you have all of net/http exposed with some sugar on top. 3) csrf tokens are just a simple library. Yes you do have to be sure to put them into your templates.
If you are having difficulty with a middle-ware concept in terms of golang there are plenty of resources online.
So I would say that I have a different feeling about making websites in golang :) I enjoy it.