They much rather hack on a webserver that they can use in 15 LOC from stdlib than some beefy JVM framework.
From the conversations I've had I strongly believe most webapps are going to be written in go in the coming years.
They much rather hack on a webserver that they can use in 15 LOC from stdlib than some beefy JVM framework.
From the conversations I've had I strongly believe most webapps are going to be written in go in the coming years.
* 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.
I ROFL at "Like a savage.", btw.
That said: I really like Golang a lot.
For Microcorruption, we did the overwhelming majority in Golang, exposing it as a JSON RPC endpoint, and then did the UI in a very small amount of Rails. It worked quite well.
One thing you can for sure say about Golang: it is fast. We deployed 3 app servers but if we had deployed only 1 it still wouldn't have broken a sweat.
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.
If, however, you've had the experience of starting a project in Sinatra and ruefully finishing it in Rails, my advice is: don't do full-featured web apps entirely in Golang.
The fact that your customers are using Go for webapps does not mean that tptacek's statement that he would give the nod to Scala for webapps but consider Go in the running with Scala for web APIs. Advice is not "incorrect" because some people make different choices.
> From the conversations I've had I strongly believe most webapps are going to be written in go in the coming years.
I'll be surprised if that ever happens. There's plenty of languages that have a good story for webapps -- Go certainly isn't the worst choice, but the advantages it has over some alternatives aren't all that unique, nor are they without tradeoffs. I wouldn't be surprised to see Go continue to make gains for a while (and then be passed up by newer things), but I don't see it ever being most webapps.