Should an ID Be an Entity? - Domain-Driven Design w/ TypeScript
This is part of the Domain-Driven Design w/ TypeScript & Node.js course. Check it out if you liked this post.
Also from the Domain-Driven Design with TypeScript series.
In this article, we talk about how we actually chain business logic using the Domain Events and the DomainEvents handlers map class, etc.
We should also talk about how this works well for a monolith application.
We should also talk about how we can eventually do this kind of stuff over a message broker / queue to cross subdomains
Why do we sometimes refer to entities directly, like
Genre, but then sometimes refer to the ids of entities, like
ArtistId instead of
Artist? Why not just refer to the entire
Artist in the aggregate?
Thanks for reading! Share this article if you found it useful.
Stay in touch!
View more in Domain-Driven Design
You may also enjoy...
A few more related articles
Learn how to use DDD and object-oriented programming concepts to model complex Node.js backends.
In software, change is inevitable. The more complex the software, the more it should be enabled to be changed. The SOLID principles are a set of principles all developers should know about in order to design robust, maintainable, and flexible software.
Want to be notified when new content comes out?
Join 2000+ other developers learning about Domain-Driven Design and Enterprise Node.js.
I won't spam ya. 🖖 Unsubscribe anytime.