Ask HN: Are you using Go for web development?
21–30 of 43 posts
Re: Ask HN: Are you using Go for web development?
#22The end result are two web applications that work as a backend and frontend for an ActivityPub link aggregator (similar to HN and old redddit).
I mostly develop in Goland as I use the debugger extensively, and I didn't want to spend the time to learn to use delve in the command line.
I tried to keep as much as possible a handmade approach, so I'm making use of the standard library over more fancy packages or frameworks.
In my specific case the biggest issue I had was with the protocol itself (ActivityPub) which allows for a large degree of flexibility in the structure of the JSON objects it passes around, a lot more than the default encoder in go allows for. I had to implement my own functionality for encoding/decoding JSON objects, and I'm currently working on adding similar functionality for binary encoding.
Links to the projects you can find in my bio.
Re: Ask HN: Are you using Go for web development?
#23Re: Ask HN: Are you using Go for web development?
#24I tried to describe my humble workflow here with a few code snippets: https://zserge.com/posts/go-web-services/
Re: Ask HN: Are you using Go for web development?
#25I have started falling in love with coding/CS again with Go.
Our philosophy is to keep things close to the metal and not use layers as much as possible. Go enables you to follow with approach with the standard libraries that come with the language.
Problem with layers/frameworks is that while they seem to solve immediate problem quickly, layers will rear their ugly head down the road , making you feel helpless during debugging
We use standard libraries
database/sql for database html/template for UI
Only external package used so far is gin-gonic/gin for middleware&routing
Re: Ask HN: Are you using Go for web development?
#26Re: Ask HN: Are you using Go for web development?
#27I start small: vim, makefile, bare Go with no dependencies. I add things only if they improve the end product from the consumer perspective (either FRs or NFRs). I even used to deploy things as systemd services, unless containers make things easier to more scalable. For the frontend I couldn't be happier since I discovered "esbuild", which is written in Go and has unbelievable performance. I tried to describe my humb…
And 6 years laters you've invented an undocumented poor man's version of Flask.
And 16 years laters you invented your own ruby on rails, except with no community, no third party libraries, no support and no documentations.
At some point you've left the company and some poor soul is dealing with your simplicity.
Re: Ask HN: Are you using Go for web development?
#28I'm a Node guy and don't know anything about Go, what's the recommended route to get started on Go for the web? Any specific framework in mind? I need WebSockets and I'm guessing Go can provide some good performance improvement over Node there.
You start with a Makefile and a main.go and from there on you invent the universe, starting from (almost) writing an http server.
Welcome to the future.
Re: Ask HN: Are you using Go for web development?
#29Yes. Nothing fancy from workflow. I pay for and use Goland because I find it so good for refactoring... worth the expense over VSCode. Generally I use standard library, with the exception being github.com/gorilla/mux Gorilla Mux for routing because it removes so much boilerplate. I do however use Python for all HTTP integration tests. With requests + voluptuous its so much more productive than doing them in Go, which…
Go is great for systems programing, building kubernetes, CLIs, etc.
It is very far from being a good idea to use it for general web development. Right tool for the job and such.
Re: Ask HN: Are you using Go for web development?
#30I start small: vim, makefile, bare Go with no dependencies. I add things only if they improve the end product from the consumer perspective (either FRs or NFRs). I even used to deploy things as systemd services, unless containers make things easier to more scalable. For the frontend I couldn't be happier since I discovered "esbuild", which is written in Go and has unbelievable performance. I tried to describe my humb…
And 1 year later you've finally deployed a registration form. And 6 years laters you've invented an undocumented poor man's version of Flask. And 16 years laters you invented your own ruby on rails, except with no community, no third party libraries, no support and no documentations. At some point you've left the company and some poor soul is dealing with your simplicity.
This made me laugh. What's wrong with tailor-made software? It seems that all we care about nowadays is to "get shit done". I wish this kind of thinking vanishes soon.