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)

1
vote
1answer
141 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){ ...
0
votes
0answers
20 views

Separation of concerns between repository and service in DDD with complex entities

This probably seems as an example of opinion-based question, but I'm actually looking for rationale on how to decide correctly, I believe there is a correct solution that can be backed by solid ...
0
votes
0answers
22 views

Where should commands be issued from a CQRS application?

Let's say I have a very simple CQRS application for communicating with some Suppliers. I'll upload some Orders to each Supplier's FTP account. I decided for 2 bounded contexts. One for managing ...
-1
votes
0answers
14 views

MVC Application Extension reusing the service / dao layers

I am about to start my own project spun off a greater Opensource project. I am trying to get my head around best practice, both in terms of application portability and stability. To explain: ...
1
vote
4answers
139 views

Domain model associations that do not required the behaviour of the associated object. How to model?

I've been struggling with this question for a while. I'm specifically thinking within the object orientated domain model. Let's say I have two entities. A supplier and a customer. There is a ...
2
votes
2answers
102 views

How to work with large aggregate roots?

I'm learning DDD and yet I have more questions than answers. Let's consider a model of a directory containing enormous number of files. Here is how I see it: Directory is an Aggregate root. This ...
0
votes
1answer
52 views

Is there any reason to override Equals for an Entity?

An entity has identity, which implies there should only be one object (e.g. a particular customer) in memory. As such, reference equality (which is what the base version of object.equals checks for) ...
1
vote
1answer
110 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 ...
1
vote
1answer
178 views

How does a search functionality fit in DDD with CQRS?

In Vaughn Vernon's book Implementing domain driven design and the accompanying sample application I found that he implemented a CQRS approach to the iddd_collaboration bounded context. He presents ...
1
vote
2answers
164 views

Is this a good Visual Studio solution structure for a domain driven design RESTful web service?

I am building a .NET 4.5 C# Web API RESTful solution and I would like someone to tell me if my project solution is correct and/or wise(-enough?) for a solution designed using Domain Driven Design, ...
20
votes
6answers
19k 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
2answers
86 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 ...
0
votes
1answer
92 views

Do cross reference database tables have a place in domain driven design?

First some background. Let's say we have a system where a customer is placing an order in a web interface. The items that customer is ordering can priced in various ways. Sometimes including the cost ...
2
votes
1answer
78 views

Fire domain events after transaction completes

I am trying to implement a domain event system that only fires its events when the associated unit-of-work commits successfully. The main reason why I want to do this is because I have other ...
1
vote
2answers
99 views

How far can I drift from my original domain model and still have the benefits of an ORM?

I have the following domain models: public class User { public int Id { get; set; } public ICollection<Product> Products { get; set; } } public class Product { public int Id { ...
1
vote
2answers
123 views

Limitations of the Identity Map pattern

After asking about the implementation in Ruby of the Identity Map pattern because the potential memory leak in long running server apps, I am considering my initial concept of that pattern. Initially ...
1
vote
3answers
146 views

“Cross-cutting” domain in DDD

I've recently started studying Domain Driven Design and so far it looks like it will help tremendously with my team's current project. I'm running into a bit of a problem though actually determining ...
0
votes
3answers
121 views

Assigning responsibility for cancelling an Order

During a conversation with our Domain Expert we can across this feature: A Customer service agent can cancel an Order by decreasing its quantity. To cancel an Order we decrease its quantity by the ...
0
votes
3answers
263 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. ...
0
votes
0answers
32 views

Security in Transversal Layer in Domain Driven Design

I'm building a solution based on Domain Driven Design, I'm trying to implement the security system (authentication, authorization, roles, system configuration, connection strings, etc..) in a ...
0
votes
0answers
46 views

Extending database model of ORM in subproject

I have a maven project which contains some entities which are stored in a database. The purpose of this project is to manage personal information, users, locations, etc. This project can work on its ...
1
vote
2answers
79 views

Design of active or passive class domain [closed]

Sorry if my (simplified) example is too broad. Given this model (written in C#): class Ball { } Let's assume that a ball can be launched. To implement this feature, I can define something like: ...
1
vote
1answer
95 views

Domain-specific Interfaces

Are there any real benefits of using interfaces over abstract classes in a domain model? Does anyone have any experience using interfaces in a domain model in a real project? From a technical ...
1
vote
1answer
70 views

DDD with entities with no relations

Disclaimer: I'm not 100% sure I understand some of the practices and concepts in DDD, so this question may actually be answered by clarification of the ideas I'm working in a legacy system (written ...
2
votes
6answers
368 views

Object Design & Cohesion - Issue & potential refactoring

Abstract I have been trying to get my head around the cohesiveness of some functionality in our code base. I’ve approached this design in different ways, and lately I’m convinced that I took the ...
0
votes
1answer
38 views

What are the boundaries of Domain Events?

As I get it, domain events imply loose coupling and separation of responsibilities. That's fine. But if domain events are allowed to cross aggregate's boundaries then it is a question how to guarantee ...
2
votes
2answers
86 views

Should I use the repository in the Domain Object or push the Domain Object back to the Service Layer?

I have come from a transaction script world and I am just starting to take a look at DDD. I am unsure of the correct way to integrate a DDD design with database persistence. This is what I have: A ...
0
votes
1answer
164 views

Onion Architecture Structure

I am looking to understand and implement the Onion Architecture and have a vague idea on how to structure everything but need help to clear up some of my confusion. Based on different examples and ...
2
votes
1answer
95 views

If the UI layer depends on the Application layer. Who starts the application/process?

This is related to DDD for a desktop application in c#...with 4 layers ui/application/domain/infrastructure. Actually 3 desktop applications sharing part of the domain and part of the infrastructure. ...
1
vote
2answers
150 views

Sanity check for design pattern used with an intricate calculation model

I am working on a project that generates technical brochures in batch. The 3rd party API that is being used expects POCOs with property names that match field names used in each of the brochure ...
2
votes
2answers
160 views

Where to put format validation in a CQRS “stylish” domain model?

It feels right to put format validation inside the domain objects (VOs or entities) because it is the natural place for high cohesion and the domain knows best what every domain ...
1
vote
1answer
77 views

Should a domain object wrap/contain a DTO interface?

Using .NET - I have an interface IPerson. This interface is implemented by classes in multiple, separate repositories, e.g. EF6 (EfPerson), custom SQL (SqlPerson), or even custom assembly connecting ...
1
vote
1answer
161 views

What is a good practice to push notifications in a “near real-time” delay in this case?

I want to enable some real-time notifications about friend's activities (social network). Technical context is: Webapp calling backend (REST API's). Scenario is: Kevin follows Bob. When Bob ...
3
votes
2answers
389 views

How far to go with Domain Driven Design?

I've read a little about domain driven design and the usage of a rich domain model, as described by Martin Fowler, and I've decided to put it in practice in a personal project, instead of using ...
2
votes
2answers
271 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 ...
0
votes
0answers
44 views

Reporting Logic vs Domain Logic

Should the reporting logic to extract domain data in a certain format reside in domain objects or separate reporting objects? The reporting logic needs to: select entities/data which match selection ...
0
votes
1answer
155 views

Technical example of modeling a domain with OOD?

Considering favoring composition over inheritance and looking at various design patterns there are multiple approaches to modeling a domain. Say you have some Entities which are very similar in some ...
1
vote
4answers
262 views

Circular dependency and object creation when attempting DDD

I have a domain where an Organization has People. Organization Entity public class Organization { private readonly List<Person> _people = new List<Person>(); public Person ...
2
votes
2answers
305 views

How to avoid duplication of code related to shared entities in the repository pattern?

I'm building a repository for a large CRM schema that has a high number of relations between entities. Some of the entities are referenced by almost all entities, e.g. Person and Company. Where I ...
1
vote
2answers
212 views

I'm not sure how to add common functionality to my business objects using DTOs/DDD? [closed]

I have created a couple of projects to create a better division of my code: I have a Portable Class Library targeting all frameworks that contains just basic DTOs (auto-generated against a database). ...
0
votes
0answers
43 views

What should a domain object's validation cover?

I'm trying to figure out how to do validation of domain objects that need external resources, such as data mappers/dao Firstly here's my code class User { const INVALID_ID = 1; const ...
3
votes
1answer
132 views

Use a custom value object or a Guid as an entity identifier in a distributed system?

tl;dr I've been told that in domain-driven design, an identifier for an entity could be a custom value object, i.e. something other than Guid, string, int, etc. Can this really be advisable in a ...
1
vote
0answers
88 views

Entities (DDD) when using CQRS on Akka

When using Akka, CQRS style, is still there a place for Entities? Or does everything now go to Aggregates, implemented as Actors + Value Objects. I notice that most entities are written as mutable ...
0
votes
2answers
396 views

DDD - Domain Driven Design, which development order should be applied?

1 - Design my entities, ie (in python): class Account: def __init__(name, author): self.name = name self.email = email 2 - Design my repositories: (as interface) class ...
0
votes
1answer
169 views

Applying DDD to a simple app with a configuration twist

I’m using the light-weight PHP Fat-Free Framework as a base to form a simple MVC based app with DDD philosophy for the Model layer. I’m aware that DDD is most suitable or enterprise solutions and that ...
16
votes
6answers
2k views

Do RESTful APIs tend to encourage anemic domain models?

I'm working on a project in which we are trying to apply both domain-driven design and REST to a service-oriented architecture. We aren't worrying about 100% REST compliance; it would probably be ...
1
vote
3answers
119 views

Do we tell the object to do something or do we do something (on/with/to/etc.) the object?

Take the (unprecedented and groundbreaking) example of the calculator: public class Calculator { public double Add(double augend, double addend) { return augend + addend; } } ...
0
votes
1answer
123 views

A specific problem with architecturing a part of our application

Firstly, I'll try to describe the real world model of what we are trying to express in C# code. We have a device called M100. It's purpose is to read\write data from\into cards (plastic or ULTRALIGHT ...
0
votes
0answers
62 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 ...
0
votes
1answer
341 views

Migrating old Asp.net 1.1 project to mvc 3 or 4

we have to migrate a very old project that are having more than 500 web forms and 400 tables and it is hugely depends on stored procedures, the current specification is: Asp.Net : .NET version 1.1 ...