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
1answer
20 views

In a CQRS/ES application, can projections be dependant?

With event sourcing, you can project an event to create query-optimised read models. This I understand. What I'm unsure about is whether these read models can depend on each other? I'm considering ...
2
votes
1answer
73 views

Should domain models instantiate other domain models?

I'm reading Domain-Driven Design at the moment and I'm trying to understand what should go in services and what should go in domain models. Say there is an application where you can reserve seats for ...
2
votes
2answers
114 views

Ubiquitous language and resource based REST API?

I have posted a question regarding Ubiquitous language and maturity level in REST API. Ubiquitous language and maturity level in REST API? After some extensive coding I realized that further ...
0
votes
1answer
41 views

How to check foreign key dependency in ddd aggregate root

When I want to call a constructor on aggregate root class Task, I am interested how can I check if a passed taskType exists in TaskType repository (enforced later in DB on ORM level). I want to ...
0
votes
0answers
51 views

Designing a DOM dependent library

Suppose for fun and learning purpose I need to write a library for forms then, how should I start? to be more descriptive let me summarize my doubts: For beginning I want to restrict myself to just ...
3
votes
1answer
100 views

Comunicating between layers in DDD

Reading the literature of DDD I came up with the following layers: Application Outsider World (Controllers, Crons, etc) Application Services (or UseCases) - which orchestrates multiple Domain ...
1
vote
1answer
132 views

Got confused while designing Aggregates

I am designing an application, which will store sports statistics, show them in different diagrams and do few more operations on them. Allow user to do some mock drafts etc. I choose to build a ...
7
votes
3answers
248 views

How to combine strict TDD and DDD?

TDD is about designing code, guided by tests. Thus, typical layers aren't usually built upfront; they should slightly appear through refactoring steps. Domain-driven design involves a lot of ...
7
votes
5answers
82 views

How to treat validation of references between aggregates?

I'm struggling a bit with referencing between aggregates. Let's assume the aggregate Car has a reference to the aggregate Driver. This reference will be modelled by having Car.driverId. Now my ...
0
votes
1answer
76 views

Where do I create/instantiate repositories in DDD that are used my Domain Services

From what I understand a DomainService should be implemented against a RepositoryInterface, so we could change with easy the repository (which its a part of the Infrastructure layer) So, if I have: ...
4
votes
3answers
67 views

In CQRS/ES, can a command create another command?

In CQRS/ES, a command is sent from the client to the server and routed to the appropriate command handler. That command handler loads an aggregate from its repository, and calls some method on it, and ...
0
votes
0answers
41 views

In an event driven microservice environment, are domain events equal to topics?

A lot of messaging frameworks have the term "topic". In a ddd microservice architecture, do these topics always reflect the domain events?
1
vote
1answer
85 views

How to atomically create a new entity in multiple contexts without coupling?

Let's assume there are multiple contexts with the same logical entity but with different notions. Creating such an entity should have the side effect that in all other contexts the same logical entity ...
2
votes
1answer
77 views

What's the difference between an implementation detail and a technical concern

I just wanted to make sure that I understand and can properly articulate the difference between these two concepts. I've always thought of an implementation detail as being the internal workings of ...
1
vote
1answer
48 views

Where should you validate the state of “other” aggregates?

Scenario: A customer places an order, then, after receiving the product, provides feedback on the order process. Assume the following aggregate roots: Customer Order Feedback Here are the ...
4
votes
2answers
106 views

Is there an elegant way to check unique contraints on domain object attributes without moving business logic into service layer?

I have been adapting domain-driven design for about 8 years now and even after all these years, there is still one thing, that has been bugging me. That is checking for a unique record in data storage ...
5
votes
2answers
129 views

Recreating complex aggregates from a persistance source

I'm building a web application with C#, and I have an aggregate root which has several entities and value objects. Then I have a repository object which persists the aggregate to the database (I'm ...
0
votes
0answers
38 views

Is there a ddd approach for sending events about embedded aggregate views

I'm investigating how we can notify UI/async clients (websocket) about an update which happened in an embedded view. Let me elaborate... We currently have a newsfeed where NewsItem is an aggregate ...
5
votes
3answers
114 views

How do you deal with legacy data integrity issues when rewriting software?

I am working on a project which is a rewrite of an existing legacy software. The legacy software primarily consists of CRUD operations (create, read, update, delete) on an SQL database. Despite the ...
2
votes
2answers
160 views

Could REST api be considered as a presentation layer in DDD?

I read a lot of questions about this concern, and some of them are Presentation VS Application layer in DDD Application layer vs domain layer? So my question is if the top layer is REST API and ...
6
votes
2answers
223 views

Is the command design pattern a good way to reduce the number of dependencies in my class?

I recently realized that I have way too many dependencies in many of my classes. Now I am trying to solve that for the most important class. I think I have an idea how but I'm not sure if it is the ...
2
votes
1answer
86 views

Can I manage transactions in the UI

Do I need an "application/service" layer to manage transactions if the domain layer only services the UI? In other words, can't I just manage transactions in the UI when I have only one consumer of ...
0
votes
2answers
40 views

Domain object using DAO within a transaction

Is it considered good practice to start a transaction in the "service/application" layer, and then have objects in the domain model make DAO calls which participate in that transaction?
4
votes
3answers
94 views

How can you separate a monolith into domain-driven libraries without duplicating interfaces and still keep dependencies simple?

I'm working on a project with web services, and I've been structuring things where: The web service contains the business logic layer A library which handles the data access layer I've recently ...
14
votes
5answers
413 views

Is it still valid to speak about anemic model in the context of functional programming?

Most of DDD tactical design patterns belong to object-oriented paradigm, and anemic model describes the situation when all business logic is put into services rather than objects thus making them a ...
4
votes
2answers
184 views

Ubiquitous language and maturity level in REST API?

According to Richardson Maturity Model there are several levels of maturity in REST approach. http://martinfowler.com/articles/richardsonMaturityModel.html Since DDD uses ubiquitous language, I am ...
5
votes
2answers
47 views

How can I protect an EventSourced aggregate from user-generated event storm?

Let's say you're building a social web app where an aggregate root (f.e. BlogPost) could be liked and unliked. Now consider a malicious user who wrote a script to perform an endless amount of like and ...
1
vote
0answers
112 views

How to authentication user in REST API (domain driven design)

I am using REST API as a presentation layer of a DDD project. In order to secure API calls I am using token based security. http://www.codeproject.com/Articles/1005485/RESTful-Day-sharp-Security-in-...
2
votes
3answers
92 views

What should be primary guideline when defining a bounded context?

When defining bounded contexts of a Domain, what should be a primary guideline: departments (Sales/Manufacturing/Warehousing), where each department has a common context (http://programmers....
2
votes
3answers
100 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
116 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
43 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 ...
1
vote
1answer
43 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 ...
4
votes
4answers
296 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 ...
2
votes
3answers
143 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 ...
4
votes
1answer
116 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, ...
6
votes
2answers
234 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 ...
3
votes
2answers
98 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 "GetBySpecialProperty"...
5
votes
4answers
298 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 ...
0
votes
0answers
71 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 ...
2
votes
2answers
104 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, ...
2
votes
2answers
146 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 ...
1
vote
2answers
141 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 ...
17
votes
3answers
429 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 ...
2
votes
0answers
69 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
2answers
76 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 ...
0
votes
3answers
134 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 (e.g....
5
votes
4answers
181 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 ...
0
votes
0answers
55 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 ...