Starting into DDD is hard, even though itβs heavily praised by their practitioners. The topic is widely covered in the now infamous βDomain Driven Designβ by Eric Evans (Blue Book) and βImplementing Domain Driven Designβ by Vaughn Vernon (Red Book).
Both of them are terribly verbose and thick, which is no surprise coming from Java engineers. The material is dense and thereβs a lot of noise around the main ideas, which makes the barrier to entry even bigger for newcomers. Many times, Iβve felt like iβm too stupid to understand what StackOverflow made obvious after few researches.
Although the verbatim is complex, the ideas behind are rather simple and easy to grasp. When it βticksβ, it just becomes common sense.
Itβs all about the business
Hereβs the main gist : domain model should be kept separate from the dangers of the outside world, and interfaces are the bridges connecting the dots. Thatβs also the basis for Hexagonal Architecture, Clean Architecture, Onion Architecture, and all the other trademarked terms that more or less boil down to the same principles.
They are all domain centric.
But Domain Driven Design takes it a step further and gives the tool to structure and develop the domain itself, while the others architectures are just a mean to encapsulate the domain. In other words, you can do Hexagonal without DDD, but you canβt really do DDD without layers around.
I believe both the blue & red books are opaque about it. Youβll be tempted to believe you either go DDD or you donβt, thereβs no in-between. Which is the reason Iβve been discouraged from trying DDD altogether.
But Vlad Khononov took another approach. In his book βLearning Domain-Driven Designβ (affiliated link), he starts with the very basic and foundational principles of DDD, which are Subdomains, Bounded Contexts and Aggregates. He then establish a scale of usability. Depending on the task at hand, you might not need to do DDD. For once, a book that introduces DDD and isnβt all-in.
One shouldnβt use a complex tool for a trivial problem.
I loved this approach and found it more genuine and useful than the other two books. Letβs see how it unfolds.
Disclaimer
I am by no mean a DDD guru or expert, but rather a learner who condensed his knowledge inside this article. I hope to provide the kind of introduction I wish I had when I started this adventure. DDD is a complicated topic, so always double check your assumptions.
Top comments (0)