4
Xoka
2y

I'd like to learn go while building a web backend. but I'm not how should I start it. I mean, should I use any framework?

I'd like to use MongoDB, so a mongoose like ORM/library would be awesome

Comments
  • 1
    No need for frameworks in go, lets keep it that way :) Start like u would start any other language: books, videos, …
  • 1
    I started by setting up something with gin. Not really a framework though, I've noticed a lot of disdain for them in golang so I'm trying to adapt to whatever makes the most sense in it. Some stuff like graphql libraries or db drivers are about the only thing I don't see people shit on.
  • 0
    So, I actually came from the Js/Ts ecosystem, & I like the nest CLI. Wondering if Golang has a framework like nestjs
  • 1
    @Xoka same situation as you, but there doesn't seem to be something like nest. Since the golang provided tools and libraries tend to be very good, it seems that people look at something like nest as complete overkill. I like the structure that nest provides so I know where you're coming from, especially with its decorators, etc. But I guess there is a more proper "go" way to do it.
  • 1
    in Go we do have frameworks, but pretty much the entire community selects not to use them. We might for example download things that are a "solved issue" for example routing, one might use Gorilla or Chi (Chi is my preference) but for the most part will setup their infrastructure and folder format by themselves and build from it.

    For an ORM type I have had success with Gorm, although It is meant for relational databases, not NoSQL databases such as Mongo.

    If you would like to learn with assistance in the form of books and videos. I recommend the Trevor Sawler videos on udemy, just get them when they are 10 bucks (which is pretty much like 5 times a month through disccounts) or use the Web programming book by Jonathan Calhoun. They both build everything pretty much from scratch, except for a few things, but they are a good way to really grasp what is happening behind the scenes of web development.
  • 0
    Google's documentation sucks in general. Golang standard library documentation is worse. I played with golang RPC standard library. Things would fail unexpectedly because of hidden shared states among rpc services.
  • 1
    @AleCx04 thank you so much :)
  • 1
    @Xoka no problem whatsoever :D have fun man!
Add Comment