I'm new to DDD and am thinking about using this design technique in my project.
However, what strikes me about DDD is that how basic the idea is. Unlike other design techniques such as MVC and TDD, it doesn't seems to contain any ground breaking ideas.
For example, I'm sure some of you will have the same feeling that the idea of root aggregates and repositories are nothing new because when you are was writing MVC web applications you have to have one single master object (i.e. the root aggregate) that contain other minor objects (i.e. value objects and entities) in the model layer in order to send data to a strongly typed view.
To me, the only new idea in DDD is probably the
Can anyone tell me if I have missed out anything here? If that's all there is to DDD, if I update one of my existing MVC application with the above 2 new ideas, can I claim it's an TDD, MVC and DDD applcation?
Domain-Driven Design(DDD) is a collection of principles and patterns that help developers craft elegant object systems. Properly applied it can lead to software abstractions called domain models. These models encapsulate complex business logic, closing the gap between business reality and code.
An aggregate is a domain-driven design pattern. It's a cluster of domain objects (e.g. entity, value object), treated as one single unit. A car is a good example. It consists of wheels, lights and an engine.
The domain-driven approach is here to solve the complexity of software development. On the other hand, you can use emergent design when the challenge is simple. However, when your application is complex, the complexity will only grow, and so will your problems. Domain-driven design bases on the business domain.
The strategic aspect of DDD aligns software development teams' efforts with the interests of the business. It helps when deciding what to focus on, usually by identifying one core domain. This may be a specific area of business or even a specific slice that's critical.
The short answer is that it's not what your code looks like that qualifies it as a DDD project, it's how you arrived at that code. Now for the long version...
You're absolutely right that there isn't anything very revolutionary about the DDD coding practices, but you seem to be a little off target with your question. A common mistake that many developers make with DDD is to focus too much on the coding practices while ignoring some of the more fundamental concepts of DDD. At its very core, DDD is a practice of iteratively developing a model with close collaboration between developers and domain experts. You can code up all the services, entities and value objects you want, but if you aren't involving domain experts in the process, or aren't improving the model over iterations, then frankly, you aren't practicing DDD. Even from a coding perspective, many consider the concepts of aggregate roots, bounded contexts and anti-corruption layers to be more valuable tools than the basic patterns.
You are not alone in how you are perceiving DDD. I find that nearly all developers go through a stage of DDD where they're trying to implement sample apps using entities, value objects and services while ignoring all the other practices that are fundamental to DDD. DDD is a process designed to handle complex business logic, so judging its merits on a sample app developed over a weekend does not expose you to the best that DDD has to offer. I urge you to continue to look deeper into DDD as I have found it to be an indespensible tool, but never forget that it is much more than a pattern language.
DDD isn't really a checklist - it's a methodology.
In addition to Stefans answer, I'd suggest the following (in order of importance):
Then there's all the other stuff!
I think most DDD practitioners would want to say:
"I work with Domain Experts to understand their needs, and write systems that (a) match the Businesses terms and Processes, (b) help other Developers understand the business domain, and (c) can flex to accomodate changing business requirements."
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With