Comment

Comment by nprateem

I want to create a load of rapid prototypes. With Go it seemed I was wading through treacle just to create a DB-backed REST server that basically just permitted CRUD on the DB with some extra business logic.

With Spring, you just declare a model object and it can infer a data repository with a ton of convention-named query methods, so the number you actually have to write is far fewer. Spring is used by so many people there are loads of good libraries. E.g. I'm just adding permissions, and without needing to hunt around for a compatible library or litter my code with conditionals, it's pretty easy to use Spring Security to configure sane permissions with annotations. With Lombok there's no need to write the garbage you used to have to (loads of getters, setters, etc.) so the code is quite clean.

Annotations also simplify DTOs with mappers - in Go I had this triplicate of model struct, DTO and mapper. Maybe there was a library I could have used to help, but the faff around setting up the DB (e.g writing SQL, configuring an ORM), updating DTOs and mappers was just crippling my velocity.

Plus, for hiring, there are tons of Java devs around the world, while for Go rates are much higher. So yeah, several factors.

parent nprateem 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton