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)

0
votes
3answers
67 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
1answer
48 views

Entity validation in DDD [on hold]

I am always curious how the validation is done for the following: Attribute/Property validation. Using preconditions/invariant/postcondition? for value object use self-encapsulation. Validating an ...
0
votes
1answer
88 views

Communicating with third party API

I am working on an App which basically communicate with a third party API, it has no back-end. The front-end will be a SPA. Here is the overall scenario: The external API needs current user's Id to ...
4
votes
4answers
82 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 ...
1
vote
0answers
27 views

Bounded Context naming and parts of speech

I keep coming up with the following Bounded Context 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 ...
2
votes
1answer
71 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 ...
1
vote
1answer
92 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 ...
1
vote
3answers
77 views

Event Sourcing and cross-context aggregate

I had this idea of different write models being used in different bounded contexts, but both being the same aggregate instance (the same events). For example consider a User aggregate that is used ...
0
votes
1answer
68 views

What is a Collection of Aggregates Referred to in Domain Driven Design?

E.g. in a domain model with two aggregate roots: book author Is there a specific term that refers to a collection of aggregates of the same root type (e.g. a collection of books)? In Confusion ...
0
votes
3answers
193 views

in DDD, should repositories expose an entity or domain objects?

As I understand it, in DDD, it is appropriate to use a repository pattern with an aggregate root. My question is, should I return the data as an entity or domain objects/DTO? Maybe some code will ...
1
vote
3answers
137 views

When a class represents a property that might be invalid, how should the validation be done?

I have a Product class which has among others an attribute Ean13 that encapsulates an EAN13 code. Here is a prototype of the Product class: @Entity @Table(name = "tb_produtos") public class Product ...
6
votes
4answers
259 views

Design pattern for “operation on object allowed, only if object is in certain state”

For example: Only job applications that are not yet in review or approved, can be updated. In other words, a person can update his job appliance form until HR starts reviewing it, or it's already ...
2
votes
2answers
104 views

Domain driven design - Entity is updateable in certain circumstances

Here is my business rule: Anyone (anonymous users) can make an Application (as in to apply for something). Applications can be updated until they are reviewed and approved by an officer. Approved ...
1
vote
2answers
120 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 ...
2
votes
3answers
141 views

When using DDD and CRQS, should be exactly one event per command?

I am looking for a way to design a ddd application with convention over configuration. Say an aggregate "Client" has a command defined "FillProfile". It will logically raise an event "ProfileFilled". ...
4
votes
3answers
178 views

Microservices architecture and bounded contexts

In the past few days I've been reading some things about microservices architecture. I didn't get the whole point yet, since I'm just starting with this, but there's one point which caught my ...
10
votes
2answers
164 views

Anemic domain models and domain services injection

The anemic domain model is described as an anti-pattern in domain driven design by Martin Fowler. To have business logic on the domain models often domain services are used. But injecting domain ...
5
votes
3answers
100 views

Confusion about the meaning of the word aggregate in domain driven design

In a discussion about domain driven design I have learned the different people seem to think of different things when using the word aggregate. The main difficulty is that some people use the word ...
11
votes
2answers
454 views

What question is answered by DDD? [duplicate]

What is the problem that is solved by Domain Driven Design? I understand what Object Oriented Programming brought and see the issues it addressed and how, and in what aspect/scenaria, it made the ...
7
votes
1answer
188 views

How to document a Ubiquitous Language?

Our company is in the process of converting a lot of manual business processes (and the associated institutional knowledge) into new enterprise software. The project is going really well, but as we ...
2
votes
1answer
116 views

Enterprise Architecture: Where to put persistence/dbContext management? [closed]

I'm working on architecting a somewhat enterprise-level solution and have a question about how to best handle the persistence details. My overall setup is that there's a core set of business ...
1
vote
3answers
153 views

CQRS and DDD terminology

Since CQRS and DDD do not imply one another I was curious what terms belong to DDD and what terms belong to CQRS. Because the two concepts are so much used together in the literature I usually mix ...
2
votes
1answer
110 views

Can “REST without PUT” support optimistic locking using ETags?

Rest without PUT models immutable, append-only (event-sourced) state changes by favouring POST-ing new reified change resources over PUT-ing updates to original. Example: making and then changing a ...
1
vote
3answers
172 views

CRUD operations in DDD

I'm designing an application with DDD. I'm moving from flat POCO objects to strong domain models, so my question is: Would I have to call my basic CRUD operations (located in my repository layer) ...
1
vote
0answers
85 views

CQRS “private” command

In CQRS, if a saga (or more precisely a process manager according to the CQRS Journey book) sends out a new command to change aggregates how can I ensure that this command is not possible to send from ...
1
vote
1answer
49 views

Aggregate root with many fields

I'm struggling with this problem for a long time now. Lets say that I'm trying to model some business that has Customers, Companies, Contracts, Invoices etc. All of them looks like good candidate for ...
3
votes
3answers
288 views

How to start using DDD in designing a “library” application

I want to design an online book reader. The first step is describing all the use cases which I have listed below: I should be able to search a book by title. I should be able to borrow a book. I ...
1
vote
1answer
63 views

Where to put common business logic in DDD with MVC

Providing I have the following scenario: I have a Web application where users can deposit money to their accounts (wire transfer). When a user deposits money to their account, they should click the ...
1
vote
2answers
53 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 ...
5
votes
1answer
204 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 ...
6
votes
4answers
237 views

Lookup Tables: Are they a leak in the domain model?

You are building a system that keeps track of Companies. Those companies have Contacts. Those contacts are often specialists that only answer certain types of questions, such as Billing/Payment, ...
1
vote
0answers
22 views

Most suitable solution for logging traffic to external services - ASP.NET

My application relies on several external services - labelled Service A, Service B and Service C in the diagram. I am looking at ways of logging the number of requests made to these services, and the ...
0
votes
1answer
190 views

Rich Model vs God Class [duplicate]

I have a legacy code containing some behaviour classes, like services and controllers. My model is pretty anemic. It's just a repository of getters and setters, and I wanna refactor it. There is a ...
0
votes
1answer
52 views

How to model a box with a key using DDD?

User can create a box with text inside. When a box is created it will have a key (UUID) assigned. This key is then will be sent to recipient. When recipient activates the key, he receives a text ...
1
vote
2answers
98 views

What to do when hydrating whole domain model is unnecessary for concrete operation?

If some model can only exist if set of values are passed to it and validation on them are performed, then how to load such a model if only one of those values is needed for some action? It seems a ...
1
vote
1answer
143 views

Data structures for designing 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. ...
3
votes
5answers
181 views

How to avoid business rules in repository?

If there is Employees repository and I have to get Employee that has a greatest salary - where to put filtering that represents business rule for that? I can get all Employees and filter them out in ...
1
vote
1answer
39 views

Confusion on aggregate root

Let's say I have the following entities. Product, Option, and OptionValue Product can be created without any options. Option must include at least one OptionValue OptionValue can be created without ...
7
votes
1answer
175 views

Does a pattern for “houskeeping” a NoSQL DB with eventual consistency exist?

I'm working with a NoSQL DB with eventual consistency. My software is not only inserting Java Objects in JSON but also creating secondary indices for cross-referencing and similar things. Due to the ...
2
votes
2answers
84 views

Enforcing aggregate rules in purchase management domain

I'm having problems defining the aggregate boundaries (and maybe even the aggregate root) to enforce the transactional consistency rule. Let me first describe the problem domain. In our domain we ...
0
votes
1answer
104 views

ASP.NET synchronous commands handlers

A question about DDD, for validating a Proof Of Concept. Let's say we have a webpage that triggers a Domain Event. For instance, updating the status of a client after an interaction occurred on that ...
2
votes
1answer
348 views

Help understanding modeling in domain-driven design

I've been trying to learn domain-driven design (and similarly Onion Architecture) the last week or so. I think I've got an understanding of it, but like math, I suck at extracting all of the ...
4
votes
3answers
176 views

DDD design question

I have a question on modelling an Entity\Aggregate root in DDD. I am refactoring a project that uses Entity Framework and business logic as services, the services contain lot of logic which I believe ...
9
votes
2answers
248 views

Should well-known business ID of an entity be represented with a dedicated type in DDD/OOP?

In practical terms it means using an custom (immutable) class over a string or some other primitive type. Examples: Publishing: International Standard Book Number. Finance: International Securities ...
5
votes
2answers
265 views

Persisting Large/Complex Entities with the Command Pattern — Am I doing it right?

I am in the process of designing and building a large-scale inventory management software-as-a-service that will, hopefully, live a long and fruitful life. Therefore I am exerting a lot of effort ...
3
votes
0answers
457 views

Domain Driven Design - DataServices vs Repositories for Domain Models vs Database Models [closed]

I've been trying to refactor an old design in to an Onion Architecture in DDD style. To that point, the project went from a monolith to 4 sub-projects: /src /Project.Application /Services ...
1
vote
1answer
50 views

Bounded contexts should contain just domain code?

In Domain-Driven Design there's the idea of bounded context which is basically a way to stablish a boundary within which a certain model is valid as far as I understood. I've found this idea very ...
6
votes
1answer
169 views

Which is the preferable design for my Gateway? [closed]

I'm writing a Gateway class that extracts information from a HTML document. One of the responsibilities of the class is to traverse a table in the document and extract data from its rows. I'm trying ...
2
votes
2answers
163 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 ...
1
vote
3answers
79 views

How to reuse domain model logic in services?

I am trying to avoid anemic domain models as it's said to be an anti-pattern. But doing so leaves my services to duplicate some of the logic. class User { public $status; public function ...