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
219 views

What is the best way to create DTOs from entities and update entities from DTOs in a layered architecture?

Option 1: At first I would make a call to my service layer, which served as an API for my core domain, to get a domain object or a list of domain objects and then pass them into the assembler which ...
2
votes
2answers
99 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) ...
2
votes
2answers
626 views

Repository pattern implementation that knows nothing about the database table and column names

I've seen around the Internet and Github, implementations for the design pattern Repository that knows about database table and column names. I was think, if I want to work with the database as a ...
14
votes
2answers
309 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
3answers
93 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 ...
1
vote
2answers
92 views

DDD using an ORM and a Active Directory Server for Persistence

With Domain Driven Design one would model out the domain. One would then use an ORM of some sort to take care of the persistence. Say you have a Product entity which has a Name, SKU and an Owner. This ...
1
vote
1answer
172 views

DDD Validation best practice: entity containing data dosen't have the context to validate before data is set. Where should set function be?

I am pretty new to DDD, so bear with me. I have a Chat room and people in the Chat room. The people in the chat room need to propose a date they would like a webinar to be on. we have a bussiness ...
1
vote
2answers
50 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 ...
1
vote
3answers
282 views

PHP - Repository matrix pattern?

I'm trying really hard to refactor some of my legacy code in the project using best practices and design patterns + DDD so I'd love some feedback on an issue I'm currently having. Let's assume that I ...
0
votes
2answers
72 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 ...
0
votes
0answers
17 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 ...
-1
votes
1answer
52 views

DDD - map or object

What is correct by DDD - should I create map of two objects eg Map or should i use more meaningfull object that will contain this pair MoreMeaningfullName{Obj1, Obj2} ? If using first approach, I ...
2
votes
1answer
186 views

Domain Driven Design - designing Aggregate Roots

Imagine you're designing an application for organizing Workshops. Workshop itself is quite complicated - it acts as a state machine with multiple possible states and transitions between them. We're ...
0
votes
2answers
104 views

How to use DDD to solve a common address situation?

This is a simple example to show a situation that I find hard to solve with DDD. Consider this: - A property (e.g. a house) has an Address. - An address can be complete or partial (country only; ...
1
vote
2answers
303 views

taxonomy of software project resourcing models

I would like to understand the impact of different resourcing models for software projects. First, I would like to identify the different resourcing approaches that are used to resource software ...
1
vote
1answer
232 views

Doubts about architectural pattern for customizable standard enterprise application [duplicate]

My company needs to build an application to be rolled out for a lot of clients. This software will have many modules and functionalities, but some of these will need specific adjustments for some ...
0
votes
0answers
19 views

What is the best way to create DTOs from entities and update entities from DTOs in a layered architecture? [duplicate]

Option 1: At first I would make a call to my service layer, which served as an API for my core domain, to get a domain object or a list of domain objects and then pass them into the assembler which ...
3
votes
3answers
102 views

Approach to designing a workflow web app that contains some automation

I have been tasked with creating a web application which will provide end-users with a self help workflow, asking them questions and skipping to another part of the workflow depending upon the ...
3
votes
2answers
197 views

When is it appropriate to map a DTO back to its Entity counterpart

From what I've read and implemented, DTO is the object that hold a subset of value from a Data model, in most cases these are immutable objects. What about the case where I need to pass either new ...
11
votes
2answers
351 views

How do you handle shared concepts in a microservice architecture?

I am researching architectural patterns for an application I'm developing and a microservice approach seems like it would be a good choice but I am not sure how to handle interactions between the ...
0
votes
1answer
102 views

DDD - Effective Aggregate Design Questions

I just read Effective Aggregate Design, by Vaughn Vernon. Summarizing the takeaway: Model true invariants Design small aggregates Reference other aggregates by identity Use eventual consistency ...
1
vote
2answers
159 views

Implementing an anti-corruption layer with domain logic

I'm building an application that compiles a single PDF document from multiple source PDF documents as follows: it takes the first page of each source document, stamps certain information on top of ...
3
votes
5answers
481 views

Is DDD not appropriate for my website or should I introduce a Query Layer?

I have inherited an ASP.NET website application and the previous developer has used what I believe are some DDD concepts. I am new to DDD and I have to admit I am struggling with the practical side of ...
2
votes
4answers
108 views

Design: How to handle user permissions across a system

My team is currently working on a massive refactor of a medium-sized application in PHP. We are doing our best to refactor our code on a module (Orders, Users, Products) basis. The issue that I am ...
1
vote
2answers
46 views

Is it normal for service methods to correlate to your views?

I've been working on learning how to implement domain services and view models in my project and have noticed a suspicious trend: When obtaining data for views from my controllers, if my domain ...
2
votes
2answers
154 views

DDD - Aggregate root with large number of children

I'll preface this question by saying I am relatively new to DDD so I may be making some fundamental mistakes here! I working on a project which involves the concepts of Accounts and Transactions (in ...
2
votes
2answers
51 views

Domain Modeling - Offerings vs. Usages

I have a question about an issue I always seem to run into when building a domain model. The issue comes up whenever a domain object is used in what I am calling an "offering" scenario and in a ...
1
vote
2answers
49 views

What layer generates commands for dependent services?

Our business works with truck drivers making pickups/deliveries of containers. The location of containers needs to be tracked. The drivers use mobile devices to generate a "DriverReport" (a log of ...
3
votes
2answers
888 views

DDD and the persistence of value objects; must we denormalize?

I've been reading up a lot on Domain-Driven Development, and I came to the question of how to preserve lack of distinct identity with value objects (VOs). While in the DDD world, this is a requirement ...
0
votes
1answer
47 views

domain driven design value object behavior

I recently finished Steve Smith and Julie Lerman's excellent Pluralsight course on Domain Driven Design, and I'm applying the training to a project. I have what I think is a good candidate for a value ...
3
votes
1answer
73 views

How does this kind of application and DDD relate?

In Domain-Driven Design the application is divided, as I understand, into four layers: Presentation Layer Application Layer Domain Layer Infrastructure Layer I understand this well, for instance, ...
0
votes
1answer
90 views

Object Oriented Analysis and Design and DDD together

I fear this question seems to broad, so I'll try to explain what I mean with some detail. I couldn't, however, find a way to divide it into other questions. If that's really the case, I gladly accept ...
0
votes
1answer
103 views

DDD friendly N-Tier alternatives

In Eric Evans book on DDD in the Modules section he says, [tiered design] is attempting to address two legitimate issues. One is the logical division of concerns: One object has responsibility ...
19
votes
5answers
6k views

Are DDD Aggregates really a good idea in a Web Application?

I'm diving in to Domain Driven Design and some of the concepts i'm coming across make a lot of sense on the surface, but when I think about them more I have to wonder if that's really a good idea. ...
2
votes
1answer
38 views

When there's no 1-1 mapping between subdomains and bounded contexts?

Reading this question and the accepted answer we see that although we would expect subdomains and bounded contexts to match that's not always the case. The person who wrote the accepted answer states ...
2
votes
3answers
112 views

Enterprise application object oriented modeling for user and role

Generally in the Enterprise Applications like ERP or ERM, CRM, BP etc. we see two things a lot, one of them is Role and the other one is User. What happens is that in the real world we have some ...
3
votes
1answer
129 views

What are subdomains, really?

In studying domain-driven design (DDD), I've come across the concept of subdomain, but I think I don't get it yet. My first understanding of this was that a subdomain is a subset of the domain of the ...
4
votes
1answer
238 views

Should I be using separate 'domain' layer?

I have been reading a lot about domain layer and DDD. However I am still confused about it. To me they seem to be a fancy name for business classes however more modelled towards your application ...
2
votes
2answers
188 views

Repository Pattern and custom queries/REST API. Is it the right approach?

I'm in the early stages of working on an application that is using the Repository Pattern to provide a data access abstraction. This application will have some form of a simple REST API but I'm not ...
1
vote
2answers
300 views

From a DDD perspective is a report generating service a domain service or an infrastructure service?

Let assume we have the following service whose responsibility is to generate Excel reports: class ExcelReportService{ public String generateReport(String fileFormatFilePath, ResultSet data){ ...
1
vote
1answer
178 views

Does snapshot change tracking break DDD principles?

I'm building a website with MVC 5 and Entity Framework 6, implementing the Unit of Work & Repository patterns, and - for flexibility and performance - would like to utilize Entity Framework's ...
1
vote
2answers
3k views

What is a best practice tier structure of a Java EE 6/7 application?

I was attempting to find a best practice for modeling the tiers in a Java EE application yesterday and couldn't come up with anything current. In the past, say java 1.4, it was four tiers: ...
1
vote
1answer
31 views

How to model parallel processes (in a Bounded Context) with the same data store?

The situation. Let's say a background process puts stuff into data containers. It runs all the time, observes system events, and populates the data accordingly. The user may launch a control panel ...
13
votes
5answers
4k views

Is it bad practice for services to share a database in SOA?

I have recently been reading Hohpe and Woolf's Enterprise Integration Patterns, some of Thomas Erl's books on SOA and watching various videos and podcasts by Udi Dahan et al. on CQRS and Event Driven ...
0
votes
1answer
32 views

Domain Analysis vs System Analysis

I am trying to determine the differences between systems analysis and domain analysis. It seems that any systems analysis occurs within a domain--so are there techniques, concepts, tools, etc. that a ...
24
votes
6answers
27k views

Difference between a service class and a Helper class

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

Is DDD any good nowadays? [closed]

This is not a rant about DDD but rather some experiences and observations I've made through the past 2 years since I first learned about it. With this post, I'd like to hear what other programmers ...
2
votes
2answers
101 views

Should ids be mapped to the implementation type

This is a question of model design, and hopefully some architecture nerds have strong opinions on this. I've been developing one that I will post in an answer. Typically, in every codebase I've ever ...
3
votes
1answer
79 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 ...
2
votes
1answer
60 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 ...