Domain Driven Design (DDD) in Golang!?

preview_player
Показать описание
In this video, I compiled a simple sample of an (opinionated) Domain Driven Design structure in Golang. The video goes through a simple domain package named `User` and explains how to use your domains to ensure your Go services speak the "application" language.

Further videos will deep dive into the hexagonal architecture pattern in Go, of which the Domain Driven Design (DDD) code will fit nicely.

By all means, I'd love to hear your feedback this DDD Pattern, and likewise please do share your own patterns in the comments below!

Рекомендации по теме
Комментарии
Автор

This is how Go should be written. Type definitions over primitives are what makes this language so powerful.

ibrahimkoz
Автор

I really liked this video and its structure. I will watch other videos as well. Great intro to DDD in Go, which is what I needed.

RootsterAnon
Автор

Great video! I would also suggest making the fields of the User struct non-exported to prevent their modification outside the domain methods.

dmitrydorofeev
Автор

Nice video. It’s good to see a video on design patterns in go. Subbed and looking forward to the next.

petenilson
Автор

nice intro to ddd would love to see how hexagonal arrch would fit in here

DanishSharma-hy
Автор

Will the compiler properly rejec any string despite you are just wrapping them on a type level?

Danielo
Автор

Very refreshing to see some real world application examples!

kiddienoob
Автор

Great video - really informative and didn’t ramble on! ‼️🎉

TheMrlewismedia
Автор

Should domain service method params be passed as already validated domain objects or should they be provided as primitive types (like in this video)?

NiccoloFant
Автор

The main issue i have with implementing DDD in Go is the folder structure it's very confusing at times..

Kaizala
Автор

How do you align the values along the same column in the structs? Is this a feature of the gopls LSP? Or some other feature? Which command do you run for this? Thanks

vikingthedude
Автор

Very informative, I think it would be very helpful if you provided a link to the code you've explained in the video. This might just be a me thing, but I can understand a lot better when I have a complete view of the codebase while following along. Obviously, I'll leave that decision to you and regardless of that, you've earned a new subscriber.

catsinthejungle
Автор

Why orm layer should be insude domain
Db orm is your independent layer

InvincibleMan
Автор

but the fields should be private in the Domain layer

davidalejandrocastiblancos
Автор

why not just use a validation lib that validates the whole struct? this seems quite excessive.

Im_Ninooo
Автор

Hi Sam do you have email or LinkedIn contact for advice on developing learning materials for newbies using Golang?

streetfashiontv