How I Structure my Go Applications for Scale

Поділитися
Вставка
  • Опубліковано 2 бер 2024
  • GoTTH Stack: github.com/tomdoesTech/gotth
    GoTTH Stack video: • Introducing The GoTTH ...
    🌎 Follow me here:
    Discord: / discord
    Twitter: / tomdoes_tech
    Facebook: / tomdoestech​
    Instagram: / tomdoestech​
    TikTok: / tomdoes_tech
    ☕ Buy me a coffee: www.buymeacoffee.com/tomn
  • Розваги

КОМЕНТАРІ • 31

  • @jorgehabib3933
    @jorgehabib3933 4 місяці тому +1

    Great video Tom. I was just looking for something like this, straightforward. I am a Typescript developers, and I know the main concepts of development, just wanted to see how it is applied in Go, specially in microservices environments

  • @johnkucharsky6927
    @johnkucharsky6927 4 місяці тому +1

    869 views in 2 days? What??? This video is awesome, deserves more

    • @TomDoesTech
      @TomDoesTech  4 місяці тому +2

      My audience doesn't really care much about Go I don't think

  • @dhaw
    @dhaw 4 місяці тому

    Tom is a genius 😉

  • @premiare
    @premiare 4 місяці тому +1

    I need to Go and get one of these hats

  • @tasmto
    @tasmto 4 місяці тому +4

    Love the hat

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      Thanks, my wife got it for me

  • @johnkucharsky6927
    @johnkucharsky6927 4 місяці тому

    You can make one main handler struct and specific struct if you need it

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      Not sure I know what you mean?

  • @IroshaHewage
    @IroshaHewage 2 місяці тому

    ❤❤

  • @001ibuyvn
    @001ibuyvn 3 місяці тому

    can you make a short video showing how you set up your config.go

    • @TomDoesTech
      @TomDoesTech  3 місяці тому

      Yeah possibly, I don't think I have a good story around config though

  • @babar-khan
    @babar-khan 2 місяці тому

    You changed your stack?

  • @001ibuyvn
    @001ibuyvn 3 місяці тому

    can you make a video how to structure go app with clean architecture, nice video btw!

    • @TomDoesTech
      @TomDoesTech  3 місяці тому

      I know nothing about clean architecture

    • @001ibuyvn
      @001ibuyvn 3 місяці тому

      @@TomDoesTech its simply that u will have service layer, controller layer, cause right now i see that u handle all logic in handler func , right ?

    • @TomDoesTech
      @TomDoesTech  3 місяці тому

      @@001ibuyvn Yeah, everything is in the handler, except for when it calls the store. I don't know why I'd add a controller or service to it, doesn't seem like they would add any value

  • @beepdotboop
    @beepdotboop 4 місяці тому +1

    I have no interest in golang but I came for the hat

  • @aleksandrpetrov3938
    @aleksandrpetrov3938 2 місяці тому

    Do you think it's a good idea to put all stores in one struct and pass only one pointer to that struct into constructors instead of all stores you need separately (userStore, companyStore etc.)? And the same container for services (if you have services layer) to pass it by reference to handlers' constructors

    • @TomDoesTech
      @TomDoesTech  2 місяці тому

      It's not a bad idea, if that's how you want to do it I don't see any reason why you couldn't do it that way

    • @aleksandrpetrov3938
      @aleksandrpetrov3938 2 місяці тому

      @@TomDoesTech don't you use service layer ever? In so called "clean architecture" they usually have controllers-services-repos. But I'm also not sure If I actually need it. May be those services start making sense when you work on a big project in big teams?

    • @TomDoesTech
      @TomDoesTech  2 місяці тому

      @@aleksandrpetrov3938 I don't know what a service layer would add to this to be honest. The store kind of works like a service layer. I also don't know what "clean architecture" is

    • @aleksandrpetrov3938
      @aleksandrpetrov3938 2 місяці тому

      @@TomDoesTech they usually put business logic inside services. Also they can be called "usecases". So the controller just recieves and unmarshals data from client, validates it. Service does all business logic using one or different repos. Also it could use methods of other services. Then service gives some result back to controller and controller handles sending proper response back to client.

  • @melihdev
    @melihdev 3 місяці тому

    Why change your JavaScript decision for go? Why don't use rust or zig to replace go?

    • @TomDoesTech
      @TomDoesTech  3 місяці тому +2

      I've never worked for a company that uses Rust or Zig, otherwise I'd happily use them

  • @ricko13
    @ricko13 4 місяці тому

    sombrero man

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      It's just a beach hat but the sides have folded up for some reason

  • @kirakira160
    @kirakira160 4 місяці тому

    missing pkg i think

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      Yeah, I could put some stuff in pkg but I don't find it really adds any value