Ddd (domain driven design) is a useful concept for analyse of requirements of a project and handling the complexity of these requirements.before that people were analysing these requirements with considering the relationships between classes and tables and in fact their design were based on database tables relationships it is not old but it has. Before attempting ddd, you should be familiar with design patterns and enterprise design patterns Knowing these makes ddd a lot easier to grasp And, as mentioned above, there is a free introduction to ddd available from infoq (where you can also find talks about ddd). Asked 4 years, 7 months ago modified 1 year, 8 months ago viewed 11k times To your last point, services in ddd are a place to put what i describe as awkward logic
If you have some type of logic or work flow that has dependencies on other entities this is the type of logic that usually doesn't fit inside a domain object itself If i have a method on my business object to perform some type of validation, the service class might execute this method (still. Api clients should be designed with domain in mind too Otherwise you lose most of benefits of ddd. The dto implementation seems part of the domain, but it means that when i create a collection of dtos in the service layer and pass it to a presentation layer, i have to reference domain layer in presentation layer, which seems wrong What is the correct way to implement dto using ddd principles?
Each aggregate has a root and a boundary The boundary defines what is inside the aggregate The root is a single, specific entity contained in the aggregate The root is the only member of the aggregate that outside objects are allowed to hold references to [.] this. Can someone explain the difference between domain and application services by providing some examples And, if a service is a domain service, would i put the actual implementation of this service w.
Sure you can probably just add a repository interface to entity a for reading entities b But the risk is that you expose knowledge for how to persist b.
OPEN