Live data from Hacker News

Ask HN: Are you using Go for web development?

news.ycombinator.com

31–40 of 43 posts

Re: Ask HN: Are you using Go for web development?

#31
Got a small starter template I use but it doesn't do much more than basic format/structure for db patterns etc.

Tools wise we use VSCode, have a good local Dev story and we migrated from sqlx to sqlc recently to speed things up.

We use gorilla mux and build API first with Vue for frontend. Really clean and simple stack with few moving parts.

Re: Ask HN: Are you using Go for web development?

#32
post #30
post #27

Earlier quoted context omitted.

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.

> And 1 year later you've finally deployed a registration form. 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.

Do custom software for personal projects. Not justifying your paycheck. I too have been the sorry sod that was handed a legacy project in a PHP self-rolled framework. I really did contemplate the consequences of my reaction after pouring weeks into the "Easy" solution. My options were to vent my frustration by throwing a brick at someone or drink myself to sleep for two months straight. I chose the latter.

This is not hyperbole.

Re: Ask HN: Are you using Go for web development?

#33
post #29
post #6

Yes. 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…

How do you access your database? How do you do migrations? How do you do end to end testing? How do you do fixtures? How do you do user input validations and error reporting? How do you do translations and 18n in general? Do you have any kind of admin ui? How do you handle assets? How do you do ajax calls? How do you send emails? How do you handle general error reporting to sentry, or similar? Go is great for systems…

Go is also great for building performant APIs (REST or RPC).

I agree is not ideal if you want a full-blown monolith web app. In that case a typical MVC framework will save you weeks.

Re: Ask HN: Are you using Go for web development?

#34
post #29

Earlier quoted context omitted.

How do you access your database? How do you do migrations? How do you do end to end testing? How do you do fixtures? How do you do user input validations and error reporting? How do you do translations and 18n in general? Do you have any kind of admin ui? How do you handle assets? How do you do ajax calls? How do you send emails? How do you handle general error reporting to sentry, or similar? Go is great for systems…

Go is also great for building performant APIs (REST or RPC). I agree is not ideal if you want a full-blown monolith web app. In that case a typical MVC framework will save you weeks.

I agree only in that it is performant, but from a purely computational point of view.

Even if it is just a rest api, you still need a database/ORM layer, a validation framework, a migrations system, a way to document it, etc.

So, from a developers life quality and company economics point of view, django or rails are way, way more performant, but not as cool I agree.

Sure, if you're building Facebook or google Go might be the best option.

Re: Ask HN: Are you using Go for web development?

#35
post #30
post #27

Earlier quoted context omitted.

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.

> And 1 year later you've finally deployed a registration form. 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.

The above user mentioned what‘s wrong with writing everything from scratch, but you chose to conveniently skip it.

Developers stay only for short amount of times compared to the lifetime of the product. New developers inherit all the tech debt, bugs and bad decisions in your custom framework.

Re: Ask HN: Are you using Go for web development?

#36
post #27
post #24

I 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.

I was only speaking about one-man personal projects. In my case, I shipped 3 of them (nullitics, lalatabs and a brand new version of onthesamepage) in 3 months. Depends on the project type and on the person, I guess.

Re: Ask HN: Are you using Go for web development?

#37
post #30
post #27

Earlier quoted context omitted.

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.

> And 1 year later you've finally deployed a registration form. 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.

It's extremely hard to justify the value it provides over something more out of the box. From an engineering perspective, it makes sense. From a business perspective, it often doesn't make sense to spend 10x as much money to make users 10% happier. It almost certainly won't cause you to make 10x as much money.

Re: Ask HN: Are you using Go for web development?

#38
Yes, we use go-gin for HTTP servers and middleware (really fast and easy to use) and gRPC+Protobuf for backend services with database access. For the frontend, we have one project that renders HTML just with Go templates, but that’s kinda clumsy and awkward to maintain. Our main webapp is built with Vue.js, and the gin server only checks auth and serves the index.html

Re: Ask HN: Are you using Go for web development?

#39
Yup.

My personal website was built using Go and Postgres. I did a lot of it from scratch using the standard library and very few dependencies.

I have my own deployment process using a makefile, git tags, and rsync. Migrations are just a set of sql files checked into the project.

This works pretty well for me since I'm the only developer on the project.

Here's my "tech" page with some information on the website: https://dwayne.xyz/tech

And the portfolio page for the website (on the website): https://dwayne.xyz/project/dwayne.xyz

Re: Ask HN: Are you using Go for web development?

#40
post #34

Earlier quoted context omitted.

Go is also great for building performant APIs (REST or RPC). I agree is not ideal if you want a full-blown monolith web app. In that case a typical MVC framework will save you weeks.

I agree only in that it is performant, but from a purely computational point of view. Even if it is just a rest api, you still need a database/ORM layer, a validation framework, a migrations system, a way to document it, etc. So, from a developers life quality and company economics point of view, django or rails are way, way more performant, but not as cool I agree. Sure, if you're building Facebook or google Go migh…

All of that is already built via libraries. Talking about facebook, they released an ORM a a while ago[1] and it has support for all the things you mention.

[1] https://github.com/ent/ent

Post reply on HN