Gophers Gone Domain-Driven: a tale of Go and DDD - Davide Imola
HTML-код
- Опубликовано: 5 фев 2025
- 🔔 FOLLOW GOLAB CHANNEL 🔔
ABSTRACT:
Domain-Driven Design (DDD) is complex, especially for Go developers. This talk will guide you through DDD basics-like domain modeling, bounded contexts, and ubiquitous language-showing why they're valuable tools for aligning code with business needs. We'll then explore hexagonal architecture to structure DDD within a Go codebase, making it adaptable and scalable.
Through real-world scenarios and common challenges, you'll learn best practices for effectively implementing DDD in Go, empowering your Gopher to navigate this intricate domain confidently.
Additional resources:
github.com/dav...
This channel is dedicated to the videos of the GoLab conference.
💛 Follow us on X:
/ golab_conf
💜 Follow us on FACEBOOK:
/ golabconf
GoLab is the first Italian international conference on the Go programming language, organized by Develer.
Develer is not just an Italian company projecting and releasing hardware and software solutions for the industrial environment, but is also an ensemble of people sharing their great passion for new technologies and how they can be applied to your everyday life.
🔸 Follow DEVELER on INSTAGRAM:
/ wearedeveler
🔹 Follow DEVELER on FACEBOOK:
/ we.are.develer
🔸 Follow DEVELER on X:
/ develer
🔹 Follow DEVELER on LINKEDIN:
/ 114426
🔸 Follow DEVELER on TELEGRAM: t.me/wearedeveler
🔹 Follow DEVELER on TIK TOK:
/ wearedeveler
I like the talk, thank you for sharing this!
But I am interested in your perspective on the following. At 19:53 you can see a few lines of code from the 'server.go' file that is initialising the services:
invSrv := inventoryService.New(pgInventoryRepository.NewProductRepository(db))
ordSrv := orderService.New(pgOrderRepository.NewOrderRepository(db), invSrv)
The dependency injection is nice, but let's say you have a userService that requires the orderService and the other way around. How do you deal with (initialising) services that are needing each other?
E.g. because the user service wants to show the orders of the user and the order service wants to show the user details next to an order.
Cyclic dependency are not allowed..