-2

I have seen this talk (no need to watch it) on how to structure your Go applications several times and I still can't conciliate with the way she strictly separates her domain objects. Her sample app is a beer review API and she separates her domain the actions an user would perform for a single beer entity but I struggle to understand how would she make the app more scaleble. What if the app would not also review beers but it is a complete management system where bars, beer-tasters, users, wines, wine-taster,etc. would need to come and interact with the beer reviews ?

Wouldn't it me more conviniente or what are the drawbacks of defining your domain beer and couple all the tipical CRUD operations like reading, listing, etc. on that single package ?

The way she structures her domain: https://github.com/katzien/go-structure-examples/tree/master/domain-hex/pkg

(Unrelated) This is the app I'm trying to apply this concepts to: https://github.com/contre95/codelamp-ims/tree/main/pkg/domain

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.