Structure Your Golang Service With Layers Like This

  Рет қаралды 12,267

Anthony GG

Anthony GG

2 ай бұрын

► Join my Discord community for free education 👉 / discord
► Exclusive Lessons, Mentorship, And Videos 👉 / anthonygg_
► 33% OFF on my Go + HTMX + Templ Course PRESALE 👉bit.ly/3UFruxO
► Enjoy a 60% Black Friday Discount on My Golang Course 👉 fulltimegodev.com
► Learn how I became a self-taught software engineer 👉fulltimegodev.com/#mystory
► Follow me on Twitter 👉 / anthdm
► Follow me on GitHub 👉 github.com/anthdm
Grab yourself a 33% OFF on the PRESALE event of my building production ready applications with GO + HTMX + Templ + Tailwindcss + JQuery course here: bit.ly/3UFruxO
SUBSCRIBE OR NO MARGARITAS
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

Пікірлер: 19
@anthonygg_
@anthonygg_ 2 ай бұрын
► 33% OFF on my Go + HTMX + Templ Course PRESALE 👉bit.ly/3UFruxO ► Join my Discord community for free education 👉 discord.com/invite/Ac7CWREe58 ► Exclusive Lessons, Mentorship, And Videos 👉 www.patreon.com/anthonygg_ ► 60% OFF on my Golang course 👉 fulltimegodev.com Thanks for watching
@michawiacek1585
@michawiacek1585 2 ай бұрын
Hi! Have you thought about uploading your courses to the Udemy platform?
@jorgezozaya5049
@jorgezozaya5049 2 ай бұрын
The beauty of channels like this lies in their ability to inspire me as an independent programmer to consistently embrace challenges that stretch beyond my comfort zone. Without access to this incredible wealth of knowledge, navigating such challenges would feel maybe unattainable.
@coffeeintocode
@coffeeintocode 2 ай бұрын
Yeah I really like this approach. It makes testing so much easier as well!
@marcs8325
@marcs8325 26 күн бұрын
I see the web API as a complete application and I actually call your transportation layer simply the presentation layer of the api (3 layers... presentation layer, business/domain layer, data layer). But we achieve the same thing... business layer is separate from the framework we're using. I haven't done much Go yet, but I do this in C# all the time. Mainly because Microsoft likes to change frameworks a lot and I like to keep my business code as stable as possible. It should not depend on stuff that might change often. Learning Go because I want something simple 😂 I'm getting tired of all the different Microsoft technologies.
@amorto3420
@amorto3420 2 ай бұрын
Love your vids Anthony. But the sound is very low on some of the videos I've watched, sometime it's a little bit difficult to hear.
@esarijal
@esarijal 2 ай бұрын
I want to ask you how to test handler that attached to services? since it is struct, do I have to change it to interface so I can mock them?
@valeriikundas1913
@valeriikundas1913 2 ай бұрын
Yes, read up on dependency inversion and testing
@anthonygg_
@anthonygg_ 2 ай бұрын
Better to test the business logic. As the handler is more of the integration part imo
@esarijal
@esarijal 2 ай бұрын
@@anthonygg_ omg this answer blown my mind. I got what you mean, you are correct man, thanks
@andreffrosa
@andreffrosa 2 ай бұрын
Why do you also separate the logging to its own layer?
@vyrwu
@vyrwu 2 ай бұрын
Is this layering needed if there’s no requirement for multiple transports up front? I’ve used hex arch for a few projects to learn it, and while I get the point, I also see that I’m producing more complex code, without a clear justification. It seems to me that it’s more like something that could be whipped out if needed, not strictly used as a general rule - but you say you „should” abstract things this way. Genuinely curious, not being edgy.
@DrewryPope
@DrewryPope 2 ай бұрын
How is raptor/hollywood going? 🙂I remembered about that the other day
@vedantmatanhelia1016
@vedantmatanhelia1016 2 ай бұрын
I wanted to do hexagon architecture for a.long time the problem for me is folder structure
@vanshajdhar9223
@vanshajdhar9223 2 ай бұрын
Are these things covered in your Golang course?
@christopher8641
@christopher8641 2 ай бұрын
Super important to note that this idea is by no means restricted to Go. I write a lot of Rust (btw) and this idea is basically just tower::Service and tower::Layer. The instrumentation is just a service that decorates another service (i.e. Layer). I will say that there is a certain "size" to a problem where these ideas shine. But, I would imagine you agree that this is not a "one size fits all" pattern. Good video
@anthonygg_
@anthonygg_ 2 ай бұрын
It reflects for all languages
@morpheus4564
@morpheus4564 19 күн бұрын
I love the onion/ hexagonal Arch. what you think about it?
Why Golang HTTP Handlers Should Return An Error
11:43
Anthony GG
Рет қаралды 6 М.
How To Use The Context Package In Golang?
17:03
Anthony GG
Рет қаралды 52 М.
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 102 МЛН
Each found a feeling.#Short #Officer Rabbit #angel
00:17
兔子警官
Рет қаралды 6 МЛН
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 58 МЛН
Don't Make this Golang Beginner Mistake!
8:57
Anthony GG
Рет қаралды 17 М.
The Golang Compiler Feature You Might Not Know!?
8:13
Anthony GG
Рет қаралды 11 М.
ThePrimeagen Hacks My Productivity
3:30
Scott Macchia
Рет қаралды 35 М.
Not a Single Line of JavaScript has Been Written??
7:05
Anthony GG
Рет қаралды 10 М.
THIS is how you SHOULD Structure your Golang Applications!?
6:25
Good APIs Vs Bad APIs: 7 Tips for API Design
5:48
ByteByteGo
Рет қаралды 207 М.
Build a Microservice with Go #2 - Routes & Handlers
10:51
Net Ninja
Рет қаралды 15 М.
3 Golang Tips For Beginners I Wish I Knew Sooner
13:18
Anthony GG
Рет қаралды 32 М.