Domain-driven design (DDD) is an approach to develop software for complex needs by connecting the implementation to an evolving model.

learn more… | top users | synonyms (1)

2
votes
3answers
70 views

How to clearly define boundaries of a bounded context

After a month or so of reading and researching DDD, I decided to start my own project and created DDD with these bounded contexts> Clients Products Orders Billing Each bounded context has rest API ...
1
vote
1answer
79 views

why exposing service instead of repository in onion architecture

I'm digging on how to structure projects and so I stumble into Onion Architecture. As to how I understand it, its more on a domain-centered-focus architecture instead of a database-driven type. I'm ...
5
votes
1answer
40 views

Using domain events to express some reached state

In general, domain events are used to make a notification, when something has happened to entity, but is it okay - from perspective of ddd - to use domain events to make a notification, when entity ...
0
votes
3answers
182 views

DDD Request Validation Handling

I stuck somewhere that I can't find a solution! There are plenty of validation questions here, but as far as I see, most of them were asking about entity validation. But what about request validation? ...
1
vote
4answers
916 views

How do you make a service stateless?

When doing Domain Driven Design it is advised that services should be stateless. There are several kinds of services when doing DDD: Application services. Domain services. Infrastructure services. ...
4
votes
4answers
289 views

Should an object be able to represent itself across components?

I'm working on a networked game. I have tried to design the various components (client, server, engine) to only about things within their domain. For example, the server should only be concerned with ...
1
vote
1answer
34 views

How can I cascade changes from one aggregate root to another?

I'm having trouble modelling a relationship in DDD. I have four entities: Claim - defines access to a Service. Service - a web service. A Service has many Claims and can belong to any number of ...
2
votes
3answers
108 views

In DDD, is validation application logic, or domain logic?

Suppose that we are modelling a form using DDD; the form may have certain kind of business rules associated with it - perhaps you will need to specify an income if you are not a student, and you are ...
1
vote
2answers
185 views

Design of an online book reader

I want to design an online book reader system as a programming exercise. I wrote down the following requirements: Searching a book by title. Bookmarking a book. Mark a book as favorite. Give rating. ...
1
vote
2answers
62 views

Saga's and Query model transaction ordering

I have the following Ubiquitous language defined by our domain expert: A User can find UserGroups and add himself to it. A user can query a list of UserGroups where he is member of and remove himself ...
4
votes
4answers
209 views

If Repository Pattern is overkill for modern ORMs (EF, nHibernate), what is a better abstraction?

I've recently read a lot of arguments against using the repository pattern with powerful ORM's like Entity Framework as it incorporates repository-like functionality, along with Unit of Work ...
1
vote
2answers
176 views

Models, types, different views and meta data

We have a software which purpose is to be used to help users build their own applications. It has to be very loose coupled with the infrastructure: for example, I can imagine users running it on MySQL ...
10
votes
3answers
5k views

DDD, Saga & Event-sourcing: Can a Compensate Action simply be a delete on the event store?

I realize the above question probably raises a few 'what??'s, but let me try to explain : I'm trying to wrap my head on a couple of related concepts, basically the Saga-pattern ( ...
4
votes
1answer
110 views

Using delegates as named lambdas

Suppose we have a domain in which we can generalise some operation by passing in a function, like the Select \ map functions. Now suppose that the function we pass in has some domain specific name, ...
0
votes
1answer
223 views

Rich Model vs God Class [duplicate]

I have a legacy code containing some behaviour classes, like services and controllers. My model is pretty anaemic. It's just a repository of getters and setters, and I want to refactor it. There is a ...
5
votes
2answers
143 views

DDD: Creating reusable modules and service type distinctions (Domain, Infrastructure, Application)

So after reading "Implementing Domain-Driven Design by Vaughn Vernon" I've decided to refactor my code for better re usability by isolating what I believe to be core domain concepts into separate ...
1
vote
2answers
611 views

DDD and collections and paging of related models?

I have a rich model, where e.g. one model A depends on many related entities/value objects. Therefore we have methods in A for retrieving collections of related objects: getFoos(), getBars() and so ...
3
votes
2answers
68 views

Repository pattern and Dependency Injection without an ORM

I want to implement the repository pattern in an old legacy project. I already did some research, and found that, without an ORM, it's completely acceptable to have methods like ...
0
votes
0answers
57 views

Bringing in unit test code with Mocking Frameworks in an established ASP.NET C# software application

Here is the information about my development environment: MongoDB 3.0.0 MongoDB C# Driver Version 1.7.0.4714 Microsoft Visual Studio Professional 2013 .NET Framework 4.0 We are about to do our ...
5
votes
3answers
2k views

Do we achieve 100% Persistence Ignorance solution if we're not using ORM's POCO objects to model the Domain?

Persistence ignorance is ability to retrieve/persist standard objects, where standard objects are considered as classes focused on particular business problem and thus don't contain any ...
2
votes
2answers
124 views

Are DDD aggregates a good boundary for unit testing?

An aggregate can represent a somewhat stable system boundary. Does it make sense to write input and output test aggregates to do most testing? In theory we could use an aggregate as a data driven way ...
2
votes
2answers
78 views

Multiple implementation architecture inside a single bounded context?

In all DDD books I read so far, they say a bounded context can have its own implementation architecture, which suggests a single architecture per bounded context. In my journey of DDD and also CQRS, ...
5
votes
1answer
312 views

DDD CQRS - per-query and per-command authorization

Summary Should authorization in CQRS/DDD be implemented per-command/query or not? I am developing for the first time an online application using more or less strictly the DDD CQRS pattern. I bumped ...
1
vote
2answers
106 views

Transactional consistency with external API calls

I have an DDD application that makes use of two external APIs: Google Calendar API and Google Gmail. In one of the application services I want to create a calendar event (using the Calendar API) and ...
2
votes
2answers
90 views

Controlled access to list of entities vs get/set access in domain model

When designing a domain, either way of following approaches can be used to access list of child entities inside a parent entity. 1. Get/Set Following approach is straight forward and simple to ...
11
votes
4answers
4k views

When should an Aggregate Root contain another AR (and when should it not)

Let me begin by first apologizing for the length of the post, but I really wanted to convey as much detail up-front so I don't take your time going back and forth in comments. I am designing an ...
0
votes
0answers
50 views

Namespace naming and parts of speech

I keep coming up with the following Namespace names. They feel right when I just type them out in a text editor, but it's bothering me that they're not the same .. I'm going to use the word "part of ...
17
votes
3answers
412 views

Relational databases and iterative development

In many approaches to software development like agile methodologies, Domain-Driven Design and Object Oriented Analysis and Design, we are encouraged to take one iterative approach to development. So ...
3
votes
1answer
210 views

Integration between services in a SOA

Assume we have a Bounded Context for Inventory (InventoryBC) and another one for Shipments (ShipmentsBC). These 2 BCs need to communicate together. They are hosted on 2 different services on different ...
32
votes
6answers
41k views

Difference between a service class and a Helper class [closed]

I would like to know what differentiates a Service class from a utility class or a helper class? A class only with underlying methods calls the dao's is a service? Doesn't the usage of Helper ...
1
vote
2answers
68 views

How should an entity that abstracts an external service do its operations?

I'm creating a system using some DDD principles and I'm stuck with a problem. To give a bit more of context on what I'm trying to do, let me first describe what the system is about: The ideia is to ...
2
votes
0answers
64 views

How to implement Repository that supports ORM's validation?

DDD has an abstract repository pattern to handle saving and fetching/finding entities in storage (db, external service, doesn't matter). My question is if Repository pattern has to only bring the ...
1
vote
3answers
175 views

How to best encapsulate features in software design?

I like domain driven design, and onion design. However I would really like my features to be encapsulated. If i check out some legacy code and I need to investigate some specific feature the best ...
0
votes
3answers
109 views

DDD: Saving changes from UI to domain object

In many cases, there are different kind of forms in an application's user interface, and these forms are use to collect all the data - that is needed to update (or create of course) domain object ...
2
votes
4answers
150 views

Design ideas - validation based on conditions outside of the domain

I am facing a very interesting problem here, and I'd like to see some design ideas from domain driven design perspective. To make it easier to express what I need I have following hypothetical ...
9
votes
4answers
1k views

Is Domain Entity violating Single Responsibility Principle?

Single responsibility ( reason to change ) of an entity should be to uniquely identify itself, in other words, its responsibility is to be findable. Eric Evan's DDD book, pg. 93: most basic ...
2
votes
3answers
234 views

Choosing an ubiquitous language across different bounded contexts

If my domain has several Bounded Contexts, but only ONE team will work on all contexts, should I develop an Ubiquitous language for each context? or should I have only one and force to into all ...
3
votes
2answers
301 views

Does DDD make sense for apps which mostly present data?

I'm responsible for designing a dashboard and data manipulation front-end for a sale transaction database and am not quite sure what type of architecture to use. The database is populated by an ...
2
votes
1answer
176 views

DDD: How to reconcile a BoundedContext with REST/WebService DTO's?

I'm just starting to learn about DDD, and I'm trying to understand how Bounded Contexts can be reconciled with client facing API's like REST/WebServices that use DTO's. For example: your system ...
4
votes
4answers
135 views

Domain Driven Design and Cross Domain interaction

I am a relative DDD newbie, but I am reading anything and everything I can get my hands on to boil out and distill my knowledge. I came across this DDD question, and one of the answers has me ...
3
votes
3answers
1k views

Domain driven design, can two aggregates have the same root?

For the purpose of separating different functionality into different classes, I have two following Aggregates: ActiveEmployee AssignTask () ReassignManager () Deactivate (string reason) ...
15
votes
3answers
910 views

Conceptual mismatch between DDD Application Services and REST API

I'm trying to design an application that has a complex business domain and a requirement to support a REST API (not strictly REST, but resource-oriented). I have some trouble coming up with a way to ...
2
votes
1answer
89 views

DDD aggregate and component structure [closed]

What do you consider that is there relationship between DDD aggregate and architectural component? I think that it is quite reasoned that services, which are related to specific aggregate, defined a ...
3
votes
6answers
1k views

Domain Model, validation, and pushing errors to the model

Looking into DDD and something I noticed is that business logic should be in the model, otherwise you just have property bags. That said how do you handle pieces of validation that require a trip to ...
1
vote
1answer
106 views

DDD: Put logic in service or aggregate root?

Let's say we are building a document management system. One project has many documents. I decide to make projects as aggregate root. If the logic to add one document into project is complicated, I ...
0
votes
5answers
335 views

Handling DomainExceptions using REST endpoint

Suppose I'm doing some DDD. Now, I have a microservice reflecting a bounded context/a part of a bounded context. Now, suppose there is a REST endpoint: '/somedomainmodel/someaction' My API user is ...
4
votes
1answer
109 views

How to model Aggregate Roots for this music event system?

Let's say I am modeling a music event system. I have: music events listing events (the items in a lineup) - a listing event has acts (the artists playing in an item in the lineup - these can be ...
1
vote
1answer
98 views

Are there more or less straightforward guidelines for adopting one or another approach to reporting in DDD? [closed]

Vernon and Millett describe several patterns of getting data for ui (reporting in general) needs. Though some pros and cons of each approach are discussed, I could not get a robust understanding of ...
2
votes
2answers
187 views

Domain driven design with eventual consistency

My domain aggregate is struggling with simple business logic so I feel like I have modeled it incorrectly. The architecture I have right now uses domain driven design with event sourcing. The domain ...
4
votes
4answers
965 views

Justification for bidirectional relationship

I typically try and avoid bidirectional relationships at all costs. Recently I've been trying to follow a more domain centric design philosophy and I'm looking for advice in the best way to solve a ...