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)

5
votes
6answers
493 views

Should a domain expert make class diagrams?

The domain expert in our team uses UML class diagrams to model the domain model. As a result, the class diagrams are more of technical models rather than domain models (it serves of some sort of ...
3
votes
2answers
74 views

Resources on securing domain models? [closed]

I'm have good resources on both security, domain modelling, and architecture patterns. I've noticed a distinct lack of any suggestion of how and where to integrate security into the systems I build. I ...
7
votes
4answers
1k views

Accessing Repositories from Domain

Say we have a task logging system, when a task is logged, the user specifies a category and the task defaults to a status of 'Outstanding'. Assume in this instance that Category and Status have to be ...
1
vote
1answer
188 views

design pattern advice: graph -> computation

I have a domain model, persisted in a database, which represents a graph. A graph consists of nodes (e.g. NodeTypeA, NodeTypeB) which are connected via branches. The two generic elements (nodes and ...
3
votes
1answer
582 views

Domain Models (PHP)

I have been programming in PHP for several years and have, in the past, adopted methods of my own to handle data within my applications. I have built my own MVC, in the past, and have a reasonable ...
8
votes
3answers
380 views

Resources for popular domain models

I have come across many situations where I had to build a system for a library or a clinic or other popular domains. The thing is a domain model for a library was probably done 1000 times already with ...
7
votes
10answers
724 views

Should an image be able to resize itself in OOP?

I'm writing an app that will have an Image entity, and I'm already having trouble deciding whose responsibility each task should be. First I have the Image class. It has a path, width, and other ...
6
votes
2answers
393 views

DDD / Layers and legacy systems

I have to refactor a complex C# app (many dialogs, mixed logic and so on). There is a part managing the communication with special hardware equipments (sending commands and receive data via ...
4
votes
1answer
378 views

Is it Ok if Domain Object cross Service Boundary

Is it Ok if Domain Object cross Service-Boundary? Everyone recommend that only DTO should be returned by Services. I am creating simple CRUD application. Is it ok if my service methods return ...
1
vote
2answers
349 views

Are factors such as Intellisense support and strong typing enough to justify the use of an 'Anaemic Domain Model'?

It's easy to accept that objects should be used in all layers except a layer nominated as a data layer. However, it's just as easy to end-up with an 'anaemic domain model' that is just an object ...
4
votes
2answers
535 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 ...
13
votes
3answers
4k views

MVVM, DDD, and WPF Layered Application Project Structure Guidance

I am trying to setup my application's structure in VS and I want to "try" and future proof it to a reasonable level. This application will be a WPF re-write of an old Winform app that had followed no ...
3
votes
7answers
902 views

Inheritance using non-abstract base class

This post is based on the question http://stackoverflow.com/questions/49002/prefer-composition-over-inheritance/11758048#comment15634305_11758048. Some people said - check whether there is “is-a” ...
4
votes
2answers
303 views

Domain Objects with Interfaces

I'm in a situation where part of my system has a dependency on another module in the same system, but the modules themselves need to remain independently deployable, where the parts they depend on ...
4
votes
1answer
485 views

Distributed application using RabbitMQ

I am on my way to create an application with 4 bounded context using CQRS & event sourcing. In order to make these bounded context talk to each other I was planning on using Rabbit MQ. My ...
2
votes
1answer
773 views

CQRS + Event Sourcing: (is it correct that) Commands are generally communicated point-to-point, while Domain Events are communicated through pub/sub?

Didn't know how to shorten that title. I'm basically trying to wrap my head around the concept of CQRS ( http://en.wikipedia.org/wiki/Command-query_separation) and related concepts. Although CQRS ...
6
votes
2answers
2k 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 ( ...
5
votes
2answers
929 views

Are Persistence-Ignorant objects able to implement lazy loading?

Persistence Ignorance is an application of single responsibility principle, which in practice means that Domain Objects (DO) shouldn't contain code related to persistence, instead they should only ...
3
votes
2answers
1k views

Should this code/logic be included in Business Objects class or a separate class?

I have created a small application which has a three tier architecture and I have business object classes to represent entities such as User, Orders, UserType etc. In these classes I have methods that ...
1
vote
1answer
2k 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: ...
2
votes
2answers
1k views

Equivalent of Domain Driven Design for functional programming languages

I really love the idea of domain driven design, however, as I'm learning Go, I'm wondering if there's the equivalent of DDD that's aimed at an effectively more functional language?
1
vote
2answers
271 views

Designing a hierarchical structure with lots of reads and writes?

I am in the process of working on a video on demand system part of it involves the management of a hierarchical tree structure (think windows explorer) which allows users to upload videos, move ...
8
votes
2answers
427 views

How to make this design closer to proper DDD?

I've read about DDD for days now and need help with this sample design. All the rules of DDD make me very confused to how I'm supposed to build anything at all when domain objects are not allowed to ...
2
votes
2answers
587 views

Web workflow solution - how should I approach the design?

We've been tasked with creating a web based workflow tool to track change management. It has a single workflow with multiple synchronous tasks for the most part, but branch out at a point to tasks ...
0
votes
1answer
383 views

DDD identifying aggregate root

I am designing the a web application using domain driven design.I have following scenario: Each applicationGroup can have one Application and each application can have multiple configuration.I am ...
3
votes
2answers
327 views

DDD: Developing the Domain Model alone

In DDD examples it seems the common method for developing the domain model is to sit with domain experts and iterate over versions of the model, say on a whiteboard, continually modifying it and ...
4
votes
3answers
484 views

Scrum, DDD, and front-end development in an enterprise environment

So, I've been working for a bank for the past 4 years. My main responsibility has been online banking. Over the past year, we've been implementing the scrum methodology. We've also changed to domain ...
9
votes
3answers
2k views

Validation and authorization in layered architecture

I know you are thinking (or maybe yelling), "not another question asking where validation belongs in a layered architecture?!?" Well, yes, but hopefully this will be a little bit of a different take ...
9
votes
3answers
2k 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 ...
1
vote
1answer
385 views

Drawback of implementing DDD service as static class?

Can Services in a domain-driven design be implemented as C# static class? What are the drawbacks of this choice? Can it be implemented as a non-singleton non-static class?
4
votes
4answers
250 views

How to decide whether to implement an operation as Entity operation vs Service operation in Domain Driven Design?

I am reading Evans's Domain Driven Design. The book says that there are entity and there are services. If I were to implement an operation, how to decide whether I should add it as a method on an ...
6
votes
5answers
6k views

Application layer vs domain layer?

I am reading Domain-Driven Design by Evans and I am at the part discussing the layered architecture. I just realized that application and domain layers are different and should be separate. In the ...
17
votes
5answers
959 views

Do ORMs enable the creation of rich domain models?

After using Hibernate on most of my projects for about 8 years, I've landed on a company that discourages its use and wants applications to only interact with the DB through stored procedures. After ...
1
vote
1answer
390 views

DDD and validation of aggregate root

Suppose an aggregate root : MailConfiguration (wrapping an AddressPart object). The AddressPart object is a simple immutable value object with some fields like senderAdress, recipentAddress (to make ...
1
vote
1answer
89 views

Question about state and domain objects

Suppose I create a domain object called UserAdministration, if i have a method called CreateUser how would i pass state to this method, would I create properties on the UserAdministration object and ...
3
votes
1answer
790 views

Forcing aggregate root child access through the aggregate root alone

Context I'm developing an application using a Domain Driven Design approach. I want to use a design pattern wherever appropriate and apply all SOLID principles. Scenario I have an order and I want ...
3
votes
1answer
537 views

what does “domain” mean when referring to DDD

What does the word domain mean regarding driven design/development? Not in terms of semantics or a scholarly definition but in terms of how it modifies processes or philosophies? I was reading a ...
4
votes
2answers
316 views

How should I include third-party models in my domain model?

I'm currently trying to design a little application using Domain Driven Design but I'm afraid I don't really get the concept yet. Let me try to explain this as clearly as possible. public interface ...
7
votes
3answers
294 views

Computed Values and Simple Reads - A nagging pain for my Domain Driven Designs!

The problem I continually face is how to deal with computed values driven by domain logic while still working efficiently against the data store. Example: I'm returning a list of Products from my ...
19
votes
6answers
17k 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
270 views

Is it ok to call external services or database inside the entity

I have "logic engine" which executes set of user configured steps. These steps are saved in the database as "Step" entities. The engine gets the first step and then executes steps until there are no ...
2
votes
1answer
436 views

How to model a many to many from a DDD perspective in UML?

I have a two entity objects Site and Customer where there is a many to many relationship. I have read you try not to model this in DDD as it is in the data model and go for a unidirectional flow. If ...
3
votes
2answers
943 views

What is a value object in domain-driven design?

I have an entity and I've realised that there is a group of properties that work together. So, I moved them to a value object (together with their behavior) and now I have a reference from my entity ...
9
votes
3answers
1k views

Are Domain Objects in Domain Driven Design only supposed to be write-only?

I've been reading about Domain Driven Design for almost two years and have been cautiously been introducing some concepts in to my daily work or at least making plans for how things I do regularly ...
0
votes
4answers
318 views

To which layer does this code belong?

When I say "Revisional Data Model", I mean a data model where information is never lost: Deletes never destroy any rows, and updates always cause an insert somewhere else to preserve a row's previous ...
5
votes
3answers
4k views

DDD with ORM where should the business logic go?

I have used an MDA (model driven architecture) tool in the past where we modeled via UML and this generated the business entities (our domain model) and the ORM (mapping etc) amongst other things. A ...
4
votes
2answers
1k views

Should I use an aggregate root when designing my repository?

I have an entity that is called Master which is composed of a number of Slave entities. There can only be one Master in my database and I want to query repositories to get the Slave for a given id. ...
13
votes
4answers
4k views

What is Domain Driven Development in practical terms?

I heard about Domain Driven Development from a developer in the area. He talked it up like it was just about the silver bullet to changing requirements. I read the wiki. Still not too clear. What ...
11
votes
4answers
544 views

Avoiding bloated Domain Objects

We're trying to move data from our bloated Service layer into our Domain layer using a DDD approach. We currently have a lot of business logic in our services, which is spread out all over the place ...
18
votes
3answers
3k views

Where we should put validation for domain model

I still looking best practice for domain model validation. Is that good to put the validation in constructor of domain model ? my domain model validation example as follows: public class Order { ...