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
3 answers

Breaking application to bounded contexts

How do you plan and divide your application into bounded contexts? On the one hand it's very handy having all this decoupling, but on the other hand too much granularity can lead to a very cumbersome development. Where is this thin line? What…
acid
  • 2,099
  • 4
  • 28
  • 41
4
votes
3 answers

Domain driven content management?

I'm wondering - what i should keep in mind when trying to apply domain driven design on CMS app that has quite complex business logic? Aren't those beasts mutually exclusive? Here's article to show what i mean.
Arnis Lapsa
  • 45,880
  • 29
  • 115
  • 195
4
votes
2 answers

Deleting a child object of an aggregate root in Entity framework

This might be asked before but I can't seem to find a solution on the site so here we go: Here is an oversimplified version of my domain model. I have 2 classes representing 2 tables in the database: public Class Person { public int Id { get;…
4
votes
1 answer

What is the scope of the Single Responsibility Principle and how does it work with DRY?

I need help with clarifying my (mis)understanding of the Single Responsibility principle (SRP). In many projects that I have worked on, my colleagues argue that the SRP means that a class should implement very limited functionality, e.g. calculating…
4
votes
2 answers

DDD - Problems in constructor and methods in entities design

I have a problem with regards to entity design. As I've read, when you design a DDD entity, the constructor should contain the values needed for an entity to "exist". For example, in the domain I am working on, a Class entity cannot exist without a…
g_b
  • 11,728
  • 9
  • 43
  • 80
4
votes
1 answer

PHP Repository Pattern Implementation Questions

What should Repositories return from service calls? An Entity (or Collection of Entities), or instead a reference to itself, which could then be used to access an property that holds a collection of Entities, for example? Take this sample…
4
votes
2 answers

Where to put the value objects in the domain layer?

Knowing that value objects represent a description of the domain, this description can be part of many entities in different bounded contexts. For example the FullName value object, this VO can live in a "book aquisition" context as member of a…
Tudor
  • 1,133
  • 1
  • 12
  • 28
4
votes
1 answer

ASP.NET Identity in Domain Driven Design Architecture

Hi I'm starting a project using DDD. I would like to use Asp.Net Identity for user authentication but IdentityUser this very coupled to Asp.net and a domain model object should not have dependencies. This is leading me to think that…
xurxodev
  • 1,639
  • 20
  • 19
4
votes
3 answers

Where to draw the line between authorization and enforcing a reference rule in DDD?

Domain Examples : 1. class Customer { public $id; public $purchaseLimitReached = TRUE; } class Order { public $customer; public function Order(Customer $customer) { if($customer->purchaseLimitReached === TRUE) { …
Tudor
  • 1,133
  • 1
  • 12
  • 28
4
votes
2 answers

Should the rule "one transaction per aggregate" be taken into consideration when modeling the domain?

Taking into consideration the domain events pattern and this post , why do people recomend keeping one aggregate per transaction model ? There are good cases when one aggregate could change the state of another one . Even by removing an aggregate…
4
votes
2 answers

Modeling loosely coupled domain model

The question doesn't really concerne DDD but would like to know if there is any way to model a loosely coupled domain model. What I mean by that ? I work for a software HR editor and we're planning to start a new application from scratch. We did an…
Tomasz Jaskuλa
  • 15,723
  • 5
  • 46
  • 73
4
votes
1 answer

How does portable class libraries, MVVM and DDD all work together?

So we are focusing on developing a enterprise web application that utilized DDD patterns with CQRS+ES. We have a pretty good handle on that from the enterprise level. Now when we want to open up our backend services to native mobile devices using…
4
votes
3 answers

Deleting object from collection Domain Driven Design

In our project we are following Domain Driven Design with entity framework. Recently i came upon one issue where i want to delete a object from collection . Lets say Customer have collection of purchase. I want to remove the particular purchase of…
Max_dev
  • 508
  • 7
  • 25
4
votes
2 answers

Winforms Databinding with a ViewModel

I have a list of classes that represent mydatabase tables for example Address,Client. My GUI tends to be a grid of data and an data entry form. This works fine for single table data entry however I now have a form that has client information and…
Jon
  • 38,814
  • 81
  • 233
  • 382
4
votes
1 answer

.NET Domain Model, when to eager load

I'm fairly new to the whole .NET scene and I'm still trying to figure this thing out. One thing that seems to be very advocated for is the Domain Driven Design pattern. And eager as I am to get a flying start in the .NET world and doing it proper I…
Patrik
  • 255
  • 3
  • 11