Questions tagged [domain-driven-design]

Domain-driven design (DDD) is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts. Note that conceptual DDD questions are better to be asked at softwareengineering.stackexchange.com.

The premise of domain-driven design is the following:

  • Placing the project's primary focus on the core domain and domain logic
  • Basing complex designs on a model
  • Initiating a creative collaboration between technical and domain experts to iteratively cut ever closer to the conceptual heart of the problem.

Domain-driven design is not a technology or a methodology. DDD provides a structure of practices and terminology for making design decisions that focus and accelerate software projects dealing with complicated domains.

The term was coined by Eric Evans in his book of the same title: Domain-Driven Design: Tackling Complexity in the Heart of Software

Books

Sample Application

6728 questions
4
votes
1 answer

ORM / How to deal with the correspondence between Domain object and Persistent object?

In an application, there are at least two ways for dealing with domain object persistence and an ORM. Mapping directly the domain object to persistence using some kind of ORM (xml or annotations) Making separation of concerns in case of a lot of…
Mik378
  • 21,881
  • 15
  • 82
  • 180
4
votes
2 answers

How is logging properly handled in cqrs context?

I'm trying to figure out how to deal with logging in a CQRS setting. The situation is as follows: I have an Rx-based event broker. I have a project Foo.Events where events inherit from EventArgs (not sure why) and correspondingly the broker expects…
Dmitri Nesteruk
  • 23,067
  • 22
  • 97
  • 166
4
votes
4 answers

DDD Using a Service Within a Repository

PROBLEM: I am pulling in third party data from an XML feed. I need to take that data and convert it into entities. POINTS FOR DISCUSSION: My question is how to use Services and Repositories in this case. So, for example, I could create a Service…
user2415616
4
votes
3 answers

Mapping tables to domain classes in a DDD architecture

My application is broken down into several assemblies. The MyProject.Core assembly contains all of the Domain objects such as Person and Sale as well as interfaces repositories such as IPersonRepository and ISaleRepository. The MyProject.Data is…
NoPyGod
  • 4,905
  • 3
  • 44
  • 72
4
votes
1 answer

Scope of Class in Domain Layer

In my domain layer, I have a class called 'Client'. Normally I would only create properties that directly relate to that client in the class, eg - 'Firstname', 'Lastname', 'Address' etc.. as well as client related methods. My question is, would it…
4
votes
1 answer

CQRS/DDD: The dummy blog/post/category/tags example

Still digging into CQRS implementations experiment, and I decided to start over my Blog from scratch and to use it as a Sandbox. I read a lot about bounded context, it seems to me that this is the most delicate approach in all this, and maybe the…
Benjamin
  • 382
  • 4
  • 12
4
votes
3 answers

Communication between Bounded Contexts

I have a WinForms application that I am hopefully going to be refactoring to be utilizing a DDD architecture. First, I am trying to really wrap my head around the architecture itself, I have Evans' book and I have Vernon's book and I find myself…
4
votes
5 answers

How many levels of abstraction do I need in the data persistence layer?

I'm writing an application using DDD techniques. This is my first attempt at a DDD project. It is also my first greenfield project and I am the sole developer. I've fleshed out the domain model and User interface. Now I'm starting on the persistence…
Kenneth Cochran
  • 11,954
  • 3
  • 52
  • 117
4
votes
1 answer

How to choose DDD Aggregate?

In book Applying Domain-Driven Design With Examples in C# in Chapter 4 (A first Sketch) on point 4. Concurrency Conflict Detection Is Important i don't understand why the author has choose this aggregates.Customer has his own aggregate and Order…
Blocked
  • 340
  • 2
  • 5
  • 20
4
votes
2 answers

repository pattern with a legacy database and Linq to SQL

I'm building an application on top of a legacy database (which I cannot change). I'm using Linq to SQL for the data access, which means I have a (Linq to SQL) class for each table. My domain model does not match with the database. For example, there…
M4N
  • 94,805
  • 45
  • 217
  • 260
4
votes
1 answer

How can class invariant strengthen pre and post-conditions?

Link You can think of the class invariant as a health criterion, which must be fulfilled by all objects in between operations. As a precondition of every public operation of the class, it can therefore be assumed that the class invariant…
4
votes
2 answers

Multiple Service Layers and Database Transactions

I'm just wondering how to best handle transactions across multiple service layers. The service layers use an ORM to store and retrieve from the database. Should the transactions be known and handled within the individual service layers? Or should…
rr.
  • 6,484
  • 9
  • 40
  • 48
4
votes
1 answer

Domain Driven Design - Repositories and aggregate roots

I have a domain model that contains a forum. I have forum, thread and post entities. The forum is a standalone entity. Ie it does not contain thread as part of an aggregate. This is because threads are not owned by a particular forum (you can move…
user197608
4
votes
1 answer

Domain driven design (a sample blog application)

I was learning about DDD recently and didn't quite understand the concepts. I have some questions about a sample blog application. Let's assume that there are four domain objects in the blog system: User, Blog, Post and Comment. One User can have…
davenkin
  • 131
  • 2
  • 8
4
votes
2 answers

DDD - Is a factory allowed to access a repository?

I'm having an aggregate-root called Person. The person also has an Address. The relation between these Classes is ManyToOne (Many Persons share the same Address). This means that when I'm creating a new Person with a specific address using a…
user1727072
  • 309
  • 4
  • 14
1 2 3
99
100